;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus ;;; Copyright © 2016 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages julia) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages elf) #:use-module (gnu packages gcc) #:use-module (gnu packages llvm) #:use-module (gnu packages libevent) #:use-module (gnu packages libunwind) #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) ; mpfr #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages wget) #:use-module (ice-9 match)) (define libuv-julia (let ((commit "52d72a52cc7ccd570929990f010ed16e2ec604c8") (revision "5")) (package (inherit libuv) (name "libuv-julia") (version (string-append "1.9.0-" revision "." (string-take commit 8))) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaLang/libuv.git") (commit commit))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "1daxh6ci6q7znxxajr3bm16dd53ragm0d681wf4kzg542qnjq3lh")))) (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments libuv) ((#:phases phases) `(modify-phases ,phases (delete 'autogen))))) (home-page "https://github.com/JuliaLang/libuv")))) (define libunwind-for-julia (package (inherit libunwind) (version "1.1-julia2") (source (origin (method url-fetch) (uri (string-append "https://s3.amazonaws.com/julialang/src/" "libunwind-" version ".tar.gz")) (sha256 (base32 "0499x7sg2v18a6cry6l8y713cgmic0adnjph8i0xr1db9p7n8qyv")))))) (define-public julia (package (name "julia") (version "0.6.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/JuliaLang/julia/releases/download/v" version "/julia-" version ".tar.gz")) (sha256 (base32 "0rd6lcc9sic10q1j3c6f9qr901i1c4554m93n2sz5b3mh37byqhw")))) (build-system gnu-build-system) (arguments `(#:test-target "test" #:modules ((ice-9 match) (guix build gnu-build-system) (guix build utils)) ;; Do not strip binaries to keep support for full backtraces. ;; See https://github.com/JuliaLang/julia/issues/17831 #:strip-binaries? #f ;; The DSOs use $ORIGIN to refer to each other, but (guix build ;; gremlin) doesn't support it yet, so skip this phase. #:validate-runpath? #f #:phases (modify-phases %standard-phases (delete 'configure) (add-after 'unpack 'prepare-deps (lambda* (#:key inputs #:allow-other-keys) (mkdir "deps/srccache") (copy-file (assoc-ref inputs "dsfmt") "deps/srccache/dsfmt-2.2.3.tar.gz") (copy-file (assoc-ref inputs "objconv") "deps/srccache/objconv.zip") (copy-file (assoc-ref inputs "suitesparse") "deps/srccache/SuiteSparse-4.4.5.tar.gz") (copy-file (string-append (assoc-ref inputs "virtualenv") "/bin/virtualenv") "julia-env") (copy-file (assoc-ref inputs "unicode-data") "doc/UnicodeData.txt") #t)) ;; FIXME: Building the documentati