From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:42737) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isoGh-0001MR-Cp for guix-patches@gnu.org; Sat, 18 Jan 2020 08:36:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isoGg-0004na-2X for guix-patches@gnu.org; Sat, 18 Jan 2020 08:36:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34725) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isoGf-0004nQ-VL for guix-patches@gnu.org; Sat, 18 Jan 2020 08:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1isoGf-00077n-TN for guix-patches@gnu.org; Sat, 18 Jan 2020 08:36:01 -0500 Subject: [bug#38546] [PATCH 04/11] use wrapper to set JULIA_LOAD_PATH and JULIA_DEPOT_PATH References: <87v9qpvbyr.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> In-Reply-To: <87v9qpvbyr.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> Resent-Message-ID: From: nixo Date: Sat, 18 Jan 2020 14:23:44 +0100 Message-ID: <87lfq4vqev.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38546@debbugs.gnu.org --- gnu/packages/julia.scm | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index e1c4685227..39c7d6d34f 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -297,7 +297,9 @@ ;; running order. I think it depends on the number of ;; runners, disabling it for now ;; https://github.com/JuliaLang/julia/issues/34330 - "tests = filter(e->!in(e,[\"backtrace\",\"exceptions\",\"client\",\"stacktraces\"]),testnames)")) + "tests = filter(e->!in(e,[\"backtrace\",\"exceptions\",\"client\", + \"stacktraces\",\"stress\",\"precompile\"]), + testnames)")) ;; When HOME is not set, julia calls uv_os_homedir, which in ;; turns call getpwuid_r. Add the HOME env variable to the ;; external julia call to fix this @@ -307,11 +309,23 @@ ;; https://github.com/JuliaLang/julia/issues/32377 (substitute* "stdlib/REPL/test/replcompletions.jl" (("@test count") "@test_broken count")) - #t))) + #t)) + (add-after 'install 'make-wrapper + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (program "julia")) + (with-directory-excursion bin + (wrap-program program + `("JULIA_LOAD_PATH" ":" prefix + ("" "$JULIA_LOAD_PATH"))) + (wrap-program program + `("JULIA_DEPOT_PATH" ":" prefix + ("" "$JULIA_DEPOT_PATH")))) + #t)))) #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")) - (string-append "PREFIX=" (assoc-ref %outputs "out")) ;; Passing the MARCH flag is necessary to build binary substitutes for ;; the supported architectures. @@ -435,7 +449,10 @@ (native-search-paths (list (search-path-specification (variable "JULIA_LOAD_PATH") - (files (list "share/julia/packages/"))))) + (files (list "share/julia/packages/"))) + (search-path-specification + (variable "JULIA_DEPOT_PATH") + (files (list "share/julia/"))))) ;; Julia is not officially released for ARM and MIPS. ;; See https://github.com/JuliaLang/julia/issues/10639 (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux")) -- 2.24.1