gnu: julia: Add missing path to JULIA_LOAD_PATH.
This commit is contained in:
parent
fc1fe722a0
commit
e78c808796
|
@ -158,7 +158,7 @@
|
||||||
(define-public julia
|
(define-public julia
|
||||||
(package
|
(package
|
||||||
(name "julia")
|
(name "julia")
|
||||||
(version "1.1.1")
|
(version "1.1.1") ;; Update also JULIA_LOAD_PATH with it
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (string-append
|
||||||
|
@ -229,77 +229,77 @@
|
||||||
;; Some tests require a home directory to be set.
|
;; Some tests require a home directory to be set.
|
||||||
(lambda _ (setenv "HOME" "/tmp") #t))
|
(lambda _ (setenv "HOME" "/tmp") #t))
|
||||||
(add-after 'unpack 'hardcode-soname-map
|
(add-after 'unpack 'hardcode-soname-map
|
||||||
;; ./src/runtime_ccall.cpp creates a map from library names to paths
|
;; ./src/runtime_ccall.cpp creates a map from library names to paths
|
||||||
;; using the output of "/sbin/ldconfig -p". Since ldconfig is not
|
;; using the output of "/sbin/ldconfig -p". Since ldconfig is not
|
||||||
;; used in Guix, we patch runtime_ccall.cpp to contain a static map.
|
;; used in Guix, we patch runtime_ccall.cpp to contain a static map.
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(use-modules (ice-9 match))
|
(use-modules (ice-9 match))
|
||||||
(substitute* "src/runtime_ccall.cpp"
|
(substitute* "src/runtime_ccall.cpp"
|
||||||
;; Patch out invocations of '/sbin/ldconfig' to avoid getting
|
;; Patch out invocations of '/sbin/ldconfig' to avoid getting
|
||||||
;; error messages about missing '/sbin/ldconfig' on Guix System.
|
;; error messages about missing '/sbin/ldconfig' on Guix System.
|
||||||
(("popen\\(.*ldconfig.*\\);")
|
(("popen\\(.*ldconfig.*\\);")
|
||||||
"NULL;\n")
|
"NULL;\n")
|
||||||
|
|
||||||
;; Populate 'sonameMap'.
|
;; Populate 'sonameMap'.
|
||||||
(("jl_read_sonames.*;")
|
(("jl_read_sonames.*;")
|
||||||
(string-join
|
(string-join
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
((input libname soname)
|
((input libname soname)
|
||||||
(string-append
|
(string-append
|
||||||
"sonameMap[\"" libname "\"] = "
|
"sonameMap[\"" libname "\"] = "
|
||||||
"\"" (assoc-ref inputs input) "/lib/" soname "\";")))
|
"\"" (assoc-ref inputs input) "/lib/" soname "\";")))
|
||||||
'(("libc" "libc" "libc.so.6")
|
'(("libc" "libc" "libc.so.6")
|
||||||
("pcre2" "libpcre2-8" "libpcre2-8.so")
|
("pcre2" "libpcre2-8" "libpcre2-8.so")
|
||||||
("mpfr" "libmpfr" "libmpfr.so")
|
("mpfr" "libmpfr" "libmpfr.so")
|
||||||
("openblas" "libblas" "libopenblas.so")
|
("openblas" "libblas" "libopenblas.so")
|
||||||
("arpack-ng" "libarpack" "libarpack.so")
|
("arpack-ng" "libarpack" "libarpack.so")
|
||||||
("lapack" "liblapack" "liblapack.so")
|
("lapack" "liblapack" "liblapack.so")
|
||||||
("libgit2" "libgit2" "libgit2.so")
|
("libgit2" "libgit2" "libgit2.so")
|
||||||
("gmp" "libgmp" "libgmp.so")
|
("gmp" "libgmp" "libgmp.so")
|
||||||
("openspecfun" "libopenspecfun" "libopenspecfun.so")
|
("openspecfun" "libopenspecfun" "libopenspecfun.so")
|
||||||
("fftw" "libfftw3" "libfftw3_threads.so")
|
("fftw" "libfftw3" "libfftw3_threads.so")
|
||||||
("fftwf" "libfftw3f" "libfftw3f_threads.so"))))))
|
("fftwf" "libfftw3f" "libfftw3f_threads.so"))))))
|
||||||
(substitute* "base/math.jl"
|
(substitute* "base/math.jl"
|
||||||
(("const libm = Base.libm_name")
|
(("const libm = Base.libm_name")
|
||||||
(string-append "const libm = \""
|
(string-append "const libm = \""
|
||||||
(assoc-ref inputs "openlibm")
|
(assoc-ref inputs "openlibm")
|
||||||
"/lib/libopenlibm.so"
|
"/lib/libopenlibm.so"
|
||||||
"\""))
|
"\""))
|
||||||
(("const openspecfun = \"libopenspecfun\"")
|
(("const openspecfun = \"libopenspecfun\"")
|
||||||
(string-append "const openspecfun = \""
|
(string-append "const openspecfun = \""
|
||||||
(assoc-ref inputs "openspecfun")
|
(assoc-ref inputs "openspecfun")
|
||||||
"/lib/libopenspecfun.so"
|
"/lib/libopenspecfun.so"
|
||||||
"\"")))
|
"\"")))
|
||||||
#t))
|
#t))
|
||||||
(add-before 'build 'fix-include-and-link-paths
|
(add-before 'build 'fix-include-and-link-paths
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; LIBUTF8PROC is a linker flag, not a build target. It is
|
;; LIBUTF8PROC is a linker flag, not a build target. It is
|
||||||
;; included in the LIBFILES_* variable which is used as a
|
;; included in the LIBFILES_* variable which is used as a
|
||||||
;; collection of build targets and a list of libraries to link
|
;; collection of build targets and a list of libraries to link
|
||||||
;; against.
|
;; against.
|
||||||
(substitute* "src/flisp/Makefile"
|
(substitute* "src/flisp/Makefile"
|
||||||
(("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\): \\$\\(OBJS\\) \\$\\(LIBFILES_release\\)")
|
(("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\): \\$\\(OBJS\\) \\$\\(LIBFILES_release\\)")
|
||||||
"$(BUILDDIR)/$(EXENAME): $(OBJS) $(LLT_release)")
|
"$(BUILDDIR)/$(EXENAME): $(OBJS) $(LLT_release)")
|
||||||
(("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\)-debug: \\$\\(DOBJS\\) \\$\\(LIBFILES_debug\\)")
|
(("\\$\\(BUILDDIR\\)/\\$\\(EXENAME\\)-debug: \\$\\(DOBJS\\) \\$\\(LIBFILES_debug\\)")
|
||||||
"$(BUILDDIR)/$(EXENAME)-debug: $(DOBJS) $(LLT_debug)"))
|
"$(BUILDDIR)/$(EXENAME)-debug: $(DOBJS) $(LLT_debug)"))
|
||||||
|
|
||||||
;; The REPL must be linked with libuv.
|
;; The REPL must be linked with libuv.
|
||||||
(substitute* "ui/Makefile"
|
(substitute* "ui/Makefile"
|
||||||
(("JLDFLAGS \\+= ")
|
(("JLDFLAGS \\+= ")
|
||||||
(string-append "JLDFLAGS += "
|
(string-append "JLDFLAGS += "
|
||||||
(assoc-ref %build-inputs "libuv")
|
(assoc-ref %build-inputs "libuv")
|
||||||
"/lib/libuv.so ")))
|
"/lib/libuv.so ")))
|
||||||
|
|
||||||
(substitute* "base/Makefile"
|
(substitute* "base/Makefile"
|
||||||
(("\\$\\(build_includedir\\)/uv/errno.h")
|
(("\\$\\(build_includedir\\)/uv/errno.h")
|
||||||
(string-append (assoc-ref inputs "libuv")
|
(string-append (assoc-ref inputs "libuv")
|
||||||
"/include/uv/errno.h")))
|
"/include/uv/errno.h")))
|
||||||
#t))
|
#t))
|
||||||
(add-before 'build 'replace-default-shell
|
(add-before 'build 'replace-default-shell
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "base/client.jl"
|
(substitute* "base/client.jl"
|
||||||
(("/bin/sh") (which "sh")))
|
(("/bin/sh") (which "sh")))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'hardcode-paths
|
(add-after 'unpack 'hardcode-paths
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "stdlib/InteractiveUtils/src/InteractiveUtils.jl"
|
(substitute* "stdlib/InteractiveUtils/src/InteractiveUtils.jl"
|
||||||
|
@ -345,9 +345,9 @@
|
||||||
;; platforms, e.g. when running "guix package --search="
|
;; platforms, e.g. when running "guix package --search="
|
||||||
(_ "MARCH=UNSUPPORTED"))
|
(_ "MARCH=UNSUPPORTED"))
|
||||||
|
|
||||||
"CONFIG_SHELL=bash" ;needed to build bundled libraries
|
"CONFIG_SHELL=bash" ;needed to build bundled libraries
|
||||||
"USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no
|
"USE_SYSTEM_DSFMT=0" ;not packaged for Guix and upstream has no
|
||||||
;build system for a shared library.
|
;build system for a shared library.
|
||||||
"USE_SYSTEM_LAPACK=1"
|
"USE_SYSTEM_LAPACK=1"
|
||||||
"USE_SYSTEM_BLAS=1"
|
"USE_SYSTEM_BLAS=1"
|
||||||
"USE_BLAS64=0" ;needed when USE_SYSTEM_BLAS=1
|
"USE_BLAS64=0" ;needed when USE_SYSTEM_BLAS=1
|
||||||
|
@ -485,7 +485,8 @@
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (search-path-specification
|
(list (search-path-specification
|
||||||
(variable "JULIA_LOAD_PATH")
|
(variable "JULIA_LOAD_PATH")
|
||||||
(files (list "share/julia/packages/")))))
|
(files (list "share/julia/packages/"
|
||||||
|
"share/julia/stdlib/v1.1/")))))
|
||||||
;; Julia is not officially released for ARM and MIPS.
|
;; Julia is not officially released for ARM and MIPS.
|
||||||
;; See https://github.com/JuliaLang/julia/issues/10639
|
;; See https://github.com/JuliaLang/julia/issues/10639
|
||||||
(supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
|
(supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
|
||||||
|
|
Loading…
Reference in New Issue