gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / julia.scm
CommitLineData
aa5fac33 1;;; GNU Guix --- Functional package management for GNU
116b29bf 2;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
5f010781 3;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
aa5fac33
RW
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)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix download)
50b40d07
RW
24 #:use-module (guix utils)
25 #:use-module (guix git-download)
aa5fac33
RW
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages algebra)
29 #:use-module (gnu packages base)
5f010781 30 #:use-module (gnu packages compression)
aa5fac33
RW
31 #:use-module (gnu packages elf)
32 #:use-module (gnu packages gcc)
33 #:use-module (gnu packages llvm)
50b40d07 34 #:use-module (gnu packages libevent)
aa5fac33
RW
35 #:use-module (gnu packages libunwind)
36 #:use-module (gnu packages maths)
37 #:use-module (gnu packages multiprecision) ; mpfr
38 #:use-module (gnu packages pcre)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages python)
44d10b1f 42 #:use-module (gnu packages python-xyz)
aa5fac33 43 #:use-module (gnu packages textutils)
d70f5139 44 #:use-module (gnu packages tls)
de4b3828 45 #:use-module (gnu packages version-control)
c2e87caa 46 #:use-module (gnu packages wget)
de4b3828 47 #:use-module (ice-9 match))
aa5fac33 48
50b40d07 49(define libuv-julia
7304d562
NB
50 (let ((commit "26dbe5672c33fc885462c509fe2a9b36f35866fd")
51 (revision "6"))
52 ;; When upgrading Julia, also upgrade this.
53 ;; Get the commit from https://github.com/JuliaLang/julia/blob/v1.1.1/deps/libuv.version
54 (package
55 (inherit libuv)
50b40d07 56 (name "libuv-julia")
d70f5139 57 (version (string-append "1.9.0-" revision "." (string-take commit 8)))
50b40d07
RW
58 (source (origin
59 (method git-fetch)
60 (uri (git-reference
61 (url "https://github.com/JuliaLang/libuv.git")
62 (commit commit)))
63 (file-name (string-append name "-" version "-checkout"))
64 (sha256
65 (base32
7304d562 66 "17pn2xmqaramilx897s9grs966i5246gi6sric5alch4g9j4685n"))))
50b40d07
RW
67 (build-system gnu-build-system)
68 (arguments
69 (substitute-keyword-arguments (package-arguments libuv)
70 ((#:phases phases)
71 `(modify-phases ,phases
72 (delete 'autogen)))))
73 (home-page "https://github.com/JuliaLang/libuv"))))
74
7304d562
NB
75(define (llvm-patch-url version name)
76 (string-append "https://raw.githubusercontent.com/JuliaLang/julia/v" version
77 "/deps/patches/" name))
78
79(define (llvm-patch name sha)
80 (let ((version "1.1.1"))
81 (origin (method url-fetch)
82 (uri (llvm-patch-url version name))
83 (sha256 (base32 sha))
84 (file-name name))))
85
86(define llvm-julia
d70f5139 87 (package
7304d562
NB
88 (inherit llvm-6)
89 (name "llvm-julia")
d70f5139
RW
90 (source (origin
91 (method url-fetch)
7304d562 92 (uri "http://releases.llvm.org/6.0.1/llvm-6.0.1.src.tar.xz")
d70f5139
RW
93 (sha256
94 (base32
7304d562
NB
95 "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn"))
96 ;; Those patches are inside the Julia source repo.
97 ;; They are _not_ Julia specific (https://github.com/julialang/julia#llvm)
98 ;; but they are required to build Julia.
99 ;; Discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919628
100 (patches
101 (list
102 (llvm-patch "llvm-6.0-D44650.patch"
103 "1336q4vqayr94wdcnlmcxh90mjdh34dzw9x2cbiqjnx9b1j8fxyb")
104 (llvm-patch "llvm-6.0-DISABLE_ABI_CHECKS.patch"
105 "014fawd1ba7yckalypfld22zgic87x9nx3cim42zrwygywd36pyg")
106 (llvm-patch "llvm-6.0-NVPTX-addrspaces.patch"
107 "1qdi2zmrjsrj0h84zv2vyly2hjcn4f67mfy0s1q353g4v4jkscqc")
108 (llvm-patch "llvm-6.0.0_D27296-libssp.patch"
109 "0s5hi2r1j63i8m6ig1346crx2aiv9f7rgb3mg80kw1wx5y7pdpfh")
110 (llvm-patch "llvm-D27629-AArch64-large_model_6.0.1.patch"
111 "1qrshmlqvnasdyc158vfn3hnbigqph3lsq7acb9w8lwkpnnm2j4z")
112 (llvm-patch "llvm-D34078-vectorize-fdiv.patch"
113 "1696hg84a0jxcnggvqsc2cdp271hf9a44p4qsd078qm1mfawkaay")
114 (llvm-patch "llvm-D42262-jumpthreading-not-i1.patch"
115 "1c8w210gwidbnkkw8anp17dk5pnxws2fl3mb2qxh7y9wzfpixgaq")
116 (llvm-patch "llvm-D44892-Perf-integration.patch"
117 "0r37jd0ssh2k1pndkfd5blgpg9z90im4vlzprhb0n0wwz45g4b05")
118 (llvm-patch "llvm-D46460.patch"
119 "1miqgswdc0qvbaf4571c2xkxyp9ais06b1bcpa83sq22vr4hbsfb")
120 (llvm-patch "llvm-D49832-SCEVPred.patch"
121 "0v5c88hgqj6dymv3j86ca5mhpqab5fbnrvjiw1nvnrnya9l4dlbn")
122 (llvm-patch "llvm-D50010-VNCoercion-ni.patch"
123 "0iblb3q1xixwrb12jpb89h3ywmqmzdp6aqp416j4ncwakyjhhfkp")
124 (llvm-patch "llvm-D50167-scev-umin.patch"
125 "1f2rakcnnyhr7w10k7gqg0k0491pyvx5ijplivw557f714ys3q6v")
126 (llvm-patch "llvm-OProfile-line-num.patch"
127 "1jvbbmwyags0xfwamb13qrf3rgcz9i1r03m9lava7swag8xb78c7")
128 (llvm-patch "llvm-PPC-addrspaces.patch"
129 "1f23nhsxh2s3jskbgs7da9nwg3s1hrkbk5aahl08x41wi3mny01p")
130 (llvm-patch "llvm-rL323946-LSRTy.patch"
131 "10cz3vy1yw0w643z7xx021wa4kymx9fcm3bjg61s6vzdqd6d9fns")
132 (llvm-patch "llvm-rL326967-aligned-load.patch"
133 "04jxnv32yj5x17hqhi8g2p8rhgp38gmjzr871w7z8s44pq10v9v4")
134 (llvm-patch "llvm-rL327898.patch"
135 "15ah49gbsll23z28kpyahi5vl0fh3fkxcgd1zmxxdcl96s3x8bnq")))))
136 (arguments
137 (substitute-keyword-arguments (package-arguments llvm-6)
138 ((#:configure-flags flags)
139 `(list ;; Taken from NixOS. Only way I could get libLLVM-6.0.so
140 "-DCMAKE_BUILD_TYPE=Release"
141
142 ;; Build a native compiler and the NVPTX backend (NVIDIA) since
143 ;; Julia insists on it, nothing more. This reduces build times and
144 ;; disk usage.
145 ,(string-append "-DLLVM_TARGETS_TO_BUILD=" (system->llvm-target))
146 "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=NVPTX"
147
148 "-DLLVM_INSTALL_UTILS=ON"
149 "-DLLVM_BUILD_TESTS=ON"
150 "-DLLVM_ENABLE_FFI=ON"
151 "-DLLVM_ENABLE_RTTI=ON"
152 ;; "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
153 ;; "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
154 ;; "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
155 "-DLLVM_ENABLE_DUMP=ON"
156 "-DLLVM_LINK_LLVM_DYLIB=ON"))))))
d70f5139 157
aa5fac33
RW
158(define-public julia
159 (package
160 (name "julia")
7304d562 161 (version "1.1.1")
aa5fac33
RW
162 (source (origin
163 (method url-fetch)
164 (uri (string-append
165 "https://github.com/JuliaLang/julia/releases/download/v"
4f54a63e 166 version "/julia-" version ".tar.gz"))
aa5fac33
RW
167 (sha256
168 (base32
7304d562 169 "0hk983mywimclgnjc41zmlppm5kfdz2aj85ky07p49ilcqxi998f"))))
aa5fac33
RW
170 (build-system gnu-build-system)
171 (arguments
de4b3828 172 `(#:test-target "test"
aa5fac33
RW
173 #:modules ((ice-9 match)
174 (guix build gnu-build-system)
175 (guix build utils))
fb799cb7 176
d70f5139
RW
177 ;; Do not strip binaries to keep support for full backtraces.
178 ;; See https://github.com/JuliaLang/julia/issues/17831
179 #:strip-binaries? #f
fb799cb7
LC
180
181 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
182 ;; gremlin) doesn't support it yet, so skip this phase.
183 #:validate-runpath? #f
184
aa5fac33 185 #:phases
6d149ec3
RW
186 (modify-phases %standard-phases
187 (delete 'configure)
4f54a63e
RW
188 (add-after 'unpack 'prepare-deps
189 (lambda* (#:key inputs #:allow-other-keys)
d70f5139 190 (mkdir "deps/srccache")
4f54a63e 191 (copy-file (assoc-ref inputs "dsfmt")
d70f5139 192 "deps/srccache/dsfmt-2.2.3.tar.gz")
4f54a63e 193 (copy-file (assoc-ref inputs "objconv")
d70f5139 194 "deps/srccache/objconv.zip")
4f54a63e 195 (copy-file (assoc-ref inputs "suitesparse")
d70f5139
RW
196 "deps/srccache/SuiteSparse-4.4.5.tar.gz")
197 (copy-file (string-append (assoc-ref inputs "virtualenv")
198 "/bin/virtualenv")
199 "julia-env")
7304d562
NB
200 (copy-file (assoc-ref inputs "libwhich")
201 (string-append "deps/srccache/libwhich-"
202 "81e9723c0273d78493dc8c8ed570f68d9ce7e89e"
203 ".tar.gz"))
204 (copy-file (assoc-ref inputs "rmath")
205 "deps/srccache/Rmath-julia-0.1.tar.gz")
206
207 ;; needed by libwhich
208 (setenv "LD_LIBRARY_PATH"
209 (string-join (map (lambda (pkg)
210 (string-append (assoc-ref inputs pkg)
211 "/lib"))
212 '("arpack-ng" "fftw" "gmp" "lapack"
213 "libgit2" "mpfr" "openblas" "openlibm"
214 "openspecfun" "pcre2"))
215 ":"))
216 #t))
cc005f90
RW
217 ;; FIXME: Building the documentation requires Julia packages that
218 ;; would be downloaded from the Internet. We should build them in a
219 ;; separate build phase.
220 (add-after 'unpack 'disable-documentation
d70f5139 221 (lambda _
cc005f90
RW
222 (substitute* "Makefile"
223 (("(install: .*) \\$\\(BUILDROOT\\)/doc/_build/html/en/index.html" _ line)
224 (string-append line "\n"))
225 (("src ui doc deps")
226 "src ui deps"))
4f54a63e 227 #t))
d70f5139
RW
228 (add-before 'check 'set-home
229 ;; Some tests require a home directory to be set.
230 (lambda _ (setenv "HOME" "/tmp") #t))
c2e87caa 231 (add-after 'unpack 'hardcode-soname-map
d70f5139
RW
232 ;; ./src/runtime_ccall.cpp creates a map from library names to paths
233 ;; using the output of "/sbin/ldconfig -p". Since ldconfig is not
234 ;; used in Guix, we patch runtime_ccall.cpp to contain a static map.
6d149ec3
RW
235 (lambda* (#:key inputs #:allow-other-keys)
236 (use-modules (ice-9 match))
d70f5139 237 (substitute* "src/runtime_ccall.cpp"
9805ad6f 238 ;; Patch out invocations of '/sbin/ldconfig' to avoid getting
59e80445 239 ;; error messages about missing '/sbin/ldconfig' on Guix System.
9805ad6f
LC
240 (("popen\\(.*ldconfig.*\\);")
241 "NULL;\n")
242
243 ;; Populate 'sonameMap'.
6d149ec3
RW
244 (("jl_read_sonames.*;")
245 (string-join
246 (map (match-lambda
247 ((input libname soname)
248 (string-append
249 "sonameMap[\"" libname "\"] = "
250 "\"" (assoc-ref inputs input) "/lib/" soname "\";")))
251 '(("libc" "libc" "libc.so.6")
c2e87caa 252 ("pcre2" "libpcre2-8" "libpcre2-8.so")
6d149ec3
RW
253 ("mpfr" "libmpfr" "libmpfr.so")
254 ("openblas" "libblas" "libopenblas.so")
255 ("arpack-ng" "libarpack" "libarpack.so")
256 ("lapack" "liblapack" "liblapack.so")
c2e87caa 257 ("libgit2" "libgit2" "libgit2.so")
6d149ec3 258 ("gmp" "libgmp" "libgmp.so")
6d149ec3 259 ("openspecfun" "libopenspecfun" "libopenspecfun.so")
cc005f90
RW
260 ("fftw" "libfftw3" "libfftw3_threads.so")
261 ("fftwf" "libfftw3f" "libfftw3f_threads.so"))))))
d70f5139
RW
262 (substitute* "base/math.jl"
263 (("const libm = Base.libm_name")
264 (string-append "const libm = \""
265 (assoc-ref inputs "openlibm")
266 "/lib/libopenlibm.so"
267 "\""))
268 (("const openspecfun = \"libopenspecfun\"")
269 (string-append "const openspecfun = \""
270 (assoc-ref inputs "openspecfun")
271 "/lib/libopenspecfun.so"
272 "\"")))
6d149ec3 273 #t))
c2e87caa
RW
274 (add-before 'build 'fix-include-and-link-paths
275 (lambda* (#:key inputs #:allow-other-keys)
276 ;; LIBUTF8PROC is a linker flag, not a build target. It is
277 ;; included in the LIBFILES_* variable which is used as a
278 ;; collection of build targets and a list of libraries to link
279 ;; against.
280 (substitute* "src/flisp/Makefile"
281 (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\): \\$\\(OBJS\\) \\$\\(LIBFILES_release\\)")
282 "$(BUILDDIR)/$(EXENAME): $(OBJS) $(LLT_release)")
283 (("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\)-debug: \\$\\(DOBJS\\) \\$\\(LIBFILES_debug\\)")
284 "$(BUILDDIR)/$(EXENAME)-debug: $(DOBJS) $(LLT_debug)"))
285
286 ;; The REPL must be linked with libuv.
287 (substitute* "ui/Makefile"
288 (("JLDFLAGS \\+= ")
289 (string-append "JLDFLAGS += "
290 (assoc-ref %build-inputs "libuv")
291 "/lib/libuv.so ")))
292
c2e87caa 293 (substitute* "base/Makefile"
7304d562 294 (("\\$\\(build_includedir\\)/uv/errno.h")
c2e87caa 295 (string-append (assoc-ref inputs "libuv")
7304d562 296 "/include/uv/errno.h")))
6d149ec3 297 #t))
c2e87caa 298 (add-before 'build 'replace-default-shell
6d149ec3
RW
299 (lambda _
300 (substitute* "base/client.jl"
301 (("/bin/sh") (which "sh")))
302 #t))
c2e87caa
RW
303 (add-after 'unpack 'hardcode-paths
304 (lambda _
7304d562 305 (substitute* "stdlib/InteractiveUtils/src/InteractiveUtils.jl"
c2e87caa
RW
306 (("`which") (string-append "`" (which "which")))
307 (("`wget") (string-append "`" (which "wget"))))
308 #t))
309 (add-before 'check 'disable-broken-tests
310 (lambda _
7304d562
NB
311 (define (touch file-name)
312 (call-with-output-file file-name (const #t)))
313 ;; FIXME: All git tests works except this one. But *THIS* "fix"
314 ;; is not working, so right now I'm disabling all libgit2.jl tests
315 ;; (substitute* "stdlib/LibGit2/test/libgit2.jl"
316 ;; (("!LibGit2.use_http_path(cfg, github_cred)") "true")
317 ;; (("LibGit2.use_http_path(cfg, mygit_cred)") "true"))
318 (map (lambda (test)
319 (delete-file test)
320 (touch test))
321 '("stdlib/Sockets/test/runtests.jl"
322 "stdlib/Distributed/test/runtests.jl"
323 ;; FIXME: see above
324 "stdlib/LibGit2/test/libgit2.jl"))
325 (substitute* "test/choosetests.jl"
326 ;; These tests fail, probably because some of the input
327 ;; binaries have been stripped and thus backtraces don't look
328 ;; as expected.
329 (("\"backtrace\",") "")
330 (("\"cmdlineargs\",") ""))
331 #t)))
aa5fac33
RW
332 #:make-flags
333 (list
334 (string-append "prefix=" (assoc-ref %outputs "out"))
7304d562 335 (string-append "PREFIX=" (assoc-ref %outputs "out"))
de4b3828
RW
336
337 ;; Passing the MARCH flag is necessary to build binary substitutes for
338 ;; the supported architectures.
339 ,(match (or (%current-target-system)
340 (%current-system))
341 ("x86_64-linux" "MARCH=x86-64")
446c7e4d 342 ("i686-linux" "MARCH=pentium4")
298fd38b 343 ("aarch64-linux" "MARCH=armv8-a")
446c7e4d
MW
344 ;; Prevent errors when querying this package on unsupported
345 ;; platforms, e.g. when running "guix package --search="
346 (_ "MARCH=UNSUPPORTED"))
de4b3828 347
aa5fac33 348 "CONFIG_SHELL=bash" ;needed to build bundled libraries
aa5fac33
RW
349 "USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no
350 ;build system for a shared library.
aa5fac33
RW
351 "USE_SYSTEM_LAPACK=1"
352 "USE_SYSTEM_BLAS=1"
353 "USE_BLAS64=0" ;needed when USE_SYSTEM_BLAS=1
7304d562
NB
354 "LIBBLAS=-lopenblas"
355 "LIBBLASNAME=libopenblas"
aa5fac33
RW
356
357 "USE_SYSTEM_FFTW=1"
358 "LIBFFTWNAME=libfftw3"
359 "LIBFFTWFNAME=libfftw3f"
360
361 ;; TODO: Suitesparse does not install shared libraries, so we cannot
362 ;; use the suitesparse package.
363 ;; "USE_SYSTEM_SUITESPARSE=1"
364 ;; (string-append "SUITESPARSE_INC=-I "
365 ;; (assoc-ref %build-inputs "suitesparse")
366 ;; "/include")
367
c2e87caa 368 "USE_GPL_LIBS=1" ;proudly
aa5fac33 369 "USE_SYSTEM_UTF8PROC=1"
c2e87caa
RW
370 (string-append "UTF8PROC_INC="
371 (assoc-ref %build-inputs "utf8proc")
372 "/include")
aa5fac33 373 "USE_SYSTEM_LLVM=1"
7304d562 374 "LLVM_VER=6.0.1"
cc005f90 375
7304d562
NB
376 "USE_LLVM_SHLIB=1"
377 "USE_SYSTEM_LIBUNWIND=1"
378 "USE_SYSTEM_LIBUV=1"
379 (string-append "LIBUV="
380 (assoc-ref %build-inputs "libuv")
381 "/lib/libuv.so")
382 (string-append "LIBUV_INC="
383 (assoc-ref %build-inputs "libuv")
384 "/include")
385 "USE_SYSTEM_PATCHELF=1"
386 "USE_SYSTEM_PCRE=1"
387 "USE_SYSTEM_OPENLIBM=1"
388
389 "USE_SYSTEM_GMP=1"
390 "USE_SYSTEM_MPFR=1"
391 "USE_SYSTEM_ARPACK=1"
392 "USE_SYSTEM_LIBGIT2=1"
393 "USE_SYSTEM_ZLIB=1"
394 "USE_SYSTEM_OPENSPECFUN=1")))
aa5fac33 395 (inputs
7304d562 396 `(("llvm" ,llvm-julia)
c0edb5b5
LC
397
398 ;; The bundled version is 3.3.0 so stick to that version. With other
399 ;; versions, we get test failures in 'linalg/arnoldi' as described in
400 ;; <https://bugs.gnu.org/30282>.
401 ("arpack-ng" ,arpack-ng-3.3.0)
402
c2e87caa 403 ("coreutils" ,coreutils) ;for bindings to "mkdir" and the like
aa5fac33
RW
404 ("lapack" ,lapack)
405 ("openblas" ,openblas) ;Julia does not build with Atlas
7304d562 406 ("libunwind" ,libunwind)
aa5fac33
RW
407 ("openlibm" ,openlibm)
408 ("openspecfun" ,openspecfun)
c2e87caa 409 ("libgit2" ,libgit2)
aa5fac33
RW
410 ("fftw" ,fftw)
411 ("fftwf" ,fftwf)
19afbea1 412 ("fortran" ,gfortran)
c2e87caa
RW
413 ("libuv" ,libuv-julia)
414 ("pcre2" ,pcre2)
aa5fac33 415 ("utf8proc" ,utf8proc)
aa5fac33 416 ("mpfr" ,mpfr)
c2e87caa
RW
417 ("wget" ,wget)
418 ("which" ,which)
5f010781 419 ("zlib" ,zlib)
4f54a63e 420 ("gmp" ,gmp)
d70f5139 421 ("virtualenv" ,python2-virtualenv)
4f54a63e
RW
422 ;; FIXME: The following inputs are downloaded from upstream to allow us
423 ;; to use the lightweight Julia release tarball. Ideally, these inputs
424 ;; would eventually be replaced with proper Guix packages.
d70f5139
RW
425
426 ;; TODO: run "make -f contrib/repackage_system_suitesparse4.make" to copy static lib
7304d562
NB
427 ;; Find dependency versions here:
428 ;; https://raw.githubusercontent.com/JuliaLang/julia/77a2c1e245c85812dc1c7687540beedecc52758f/deps/Versions.make
429 ("rmath"
430 ,(origin
431 (method git-fetch)
432 (uri (git-reference
433 (url "https://github.com/JuliaLang/Rmath-julia")
434 (commit "v0.1")))
435 (file-name "rmath-julia-0.1-checkout")
436 (sha256
437 (base32
438 "1zkpy0cg5zivq40zbhbdgj9128fqzs2j94wkwih8nc6xaj3gp9p6"))))
4f54a63e
RW
439 ("suitesparse"
440 ,(origin
441 (method url-fetch)
d70f5139 442 (uri "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.5.tar.gz")
4f54a63e
RW
443 (sha256
444 (base32
d70f5139 445 "1jcbxb8jx5wlcixzf6n5dca2rcfx6mlcms1k2rl5gp67ay3bix43"))))
4f54a63e
RW
446 ("objconv"
447 ,(origin
448 (method url-fetch)
81bf0fd0
MB
449 ;; No versioned URL, see <https://www.agner.org/optimize/> for updates.
450 (uri "https://www.agner.org/optimize/objconv.zip")
2930a39b 451 (file-name "objconv-2018-10-07.zip")
4f54a63e
RW
452 (sha256
453 (base32
2930a39b 454 "0wp6ld9vk11f4nnkn56627zmlv9k5vafi99qa3yyn1pgcd61zcfs"))))
7304d562
NB
455 ("libwhich"
456 ,(let ((commit "81e9723c0273d78493dc8c8ed570f68d9ce7e89e"))
457 (origin
458 ;; Note: We use a /tarball URL, but that's because Julia's build
459 ;; system checks the hash of that tarball; thus we can't use
460 ;; 'git-fetch'.
461 (method url-fetch)
462 (uri (string-append
463 "https://api.github.com/repos/vtjnash/libwhich/tarball/"
464 commit))
465 (file-name (string-append "libwhich-" (string-take commit 7)
466 ".tar.gz"))
467 (sha256
468 (base32
469 "1p7zg31kpmpbmh1znrk1xrbd074agx13b9q4dcw8n2zrwwdlbz3b")))))
4f54a63e
RW
470 ("dsfmt"
471 ,(origin
472 (method url-fetch)
473 (uri (string-append
474 "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/"
475 "SFMT/dSFMT-src-2.2.3.tar.gz"))
476 (sha256
477 (base32
d70f5139 478 "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42"))))))
aa5fac33 479 (native-inputs
d70f5139
RW
480 `(("openssl" ,openssl)
481 ("perl" ,perl)
aa5fac33
RW
482 ("patchelf" ,patchelf)
483 ("pkg-config" ,pkg-config)
7304d562 484 ("python" ,python-2)))
11d73fb4 485 (native-search-paths
486 (list (search-path-specification
487 (variable "JULIA_LOAD_PATH")
488 (files (list "share/julia/packages/")))))
9e54e957
RW
489 ;; Julia is not officially released for ARM and MIPS.
490 ;; See https://github.com/JuliaLang/julia/issues/10639
298fd38b 491 (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
4f447d2f 492 (home-page "https://julialang.org/")
aa5fac33
RW
493 (synopsis "High-performance dynamic language for technical computing")
494 (description
495 "Julia is a high-level, high-performance dynamic programming language for
496technical computing, with syntax that is familiar to users of other technical
497computing environments. It provides a sophisticated compiler, distributed
498parallel execution, numerical accuracy, and an extensive mathematical function
499library.")
500 (license license:expat)))