From unknown Fri Jun 20 07:12:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#51319 <51319@debbugs.gnu.org> To: bug#51319 <51319@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Better interoperability between guix and Julia built-in package manager Reply-To: bug#51319 <51319@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:12:12 +0000 retitle 51319 [PATCH 0/2] Better interoperability between guix and Julia bu= ilt-in package manager reassign 51319 guix-patches submitter 51319 Jean-Baptiste Volatier severity 51319 normal tag 51319 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 21 09:07:19 2021 Received: (at submit) by debbugs.gnu.org; 21 Oct 2021 13:07:19 +0000 Received: from localhost ([127.0.0.1]:56488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdXmx-0008GQ-J3 for submit@debbugs.gnu.org; Thu, 21 Oct 2021 09:07:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:49768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdXmw-0008GJ-1O for submit@debbugs.gnu.org; Thu, 21 Oct 2021 09:07:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdXmv-00020t-Tm for guix-patches@gnu.org; Thu, 21 Oct 2021 09:07:17 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:32060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdXms-0003Sy-4X for guix-patches@gnu.org; Thu, 21 Oct 2021 09:07:17 -0400 Date: Thu, 21 Oct 2021 13:06:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1634821620; bh=PHg3brmTOlCI7OxK+03DW5rPyepuT4GChDce2YLkNz0=; h=Date:To:From:Cc:Reply-To:Subject:From; b=nJ6RsJd02cY6Wili6H7G19riB9vVfd9BN11tNwFLoTr1Ktf/MA6b74YrIJGLnDp2O wT0WWn9OFXHZj6cpxhDC6veyGST6Ax1NwGxXXxESpwJQ88enPDf19LFQqdYV3PwQ22 Pu5fA0fCgpGRCqJRWePAT3lA939lpBIh08AwEWaRZhqsO+oNkQ00U7ojobrhg4/7Xb wiV6ly0PDTbBhM+l5+ix5hEYRY+K/k8dUxWqEyhuwAHiuCi1DdbBEH5oxucdt6GP1J mYRbVmSXJIdo10W3gsYXdZtpqtwZBNlRh2VUZ9dwyHPOxa8e6ZEr4F1yYdHAboi7QX h+D0mTZsN1dPw== To: guix-patches@gnu.org From: Jean-Baptiste Volatier Subject: [PATCH 0/2] Better interoperability between guix and Julia built-in package manager Message-ID: <20211021130648.14594-1-jbv@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.40.134; envelope-from=jbv@pm.me; helo=mail-40134.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Jean-Baptiste Volatier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jean-Baptiste Volatier Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) With this patch, when a user install a package using Julia package manager, the package manager finds packages that were already installed in the guix profile and use them. First patch of the serie does the implementation, the second patch is an ex= ample using sundials_jll package. Sundials_jll is a julia package that wraps the sundials library, it is typi= cally not installed on its own but as a dependency of DifferentialEquations.jl for ex= ample. As DifferentialEquations.jl is not currently packaged in julia, a fallback = is to install it with julia package manager. Unfortunately that will also install sundials_jll and downloads some .so that will fail to load on Guix because = of linker incompatilibities. Now with the proposed patch, the user can install sundials_jll using guix, and then julia package manager will use this package instead of downloading= some binary files. As for the patch itself, it works by following more closely the directory structure that Julia expects in JULIA_DEPOT_PATH. Namely the packages subfolder should not contain packages but packages/XXXX/ where XXXX is a string encoding package uuid and sha1 of package files. $JULIA_DEPOT_PATH/packages was also used as JULIA_LOAD_PATH, this will not work anymore as packages are behind a layer of XXXX sub directories. So instead I added a new subfolder $JULIA_DEPOT_PATH/loadpath where the pac= kage is installed and $JULIA_DEPOT_PATH/packages/XXXX is a symlink to it. Jean-Baptiste Volatier (2): build-system/julia: Enable Julia Pkg to find installed packages gnu: Add julia-sundials-jull gnu/packages/julia-jll.scm | 38 +++++++++++++++++++++++++ gnu/packages/julia-xyz.scm | 2 +- gnu/packages/julia.scm | 2 +- gnu/packages/maths.scm | 24 ++++++++++++++++ guix/build/julia-build-system.scm | 46 ++++++++++++++++++++++++++++--- 5 files changed, 106 insertions(+), 6 deletions(-) -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 21 09:10:10 2021 Received: (at 51319) by debbugs.gnu.org; 21 Oct 2021 13:10:10 +0000 Received: from localhost ([127.0.0.1]:56499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdXpi-0008MW-8D for submit@debbugs.gnu.org; Thu, 21 Oct 2021 09:10:10 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:19547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdXpg-0008MC-MY for 51319@debbugs.gnu.org; Thu, 21 Oct 2021 09:10:09 -0400 Date: Thu, 21 Oct 2021 13:09:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1634821802; bh=PHg3brmTOlCI7OxK+03DW5rPyepuT4GChDce2YLkNz0=; h=Date:To:From:Cc:Reply-To:Subject:From; b=WGdSPycwv0r+DKnFyLsQ998Xj4QMdHMaoINBAjgOdt6LroE/7/uPfQHus75fmk58S sFqjRg4V8MU3PHZHAzpECCzn7y7Vo/qFhACgS8c3WDapk6rNUL6ty5+qNwJQTEwR9R SJ6uLezfNlc/ybSFhn4WPsvnBlj0pdiuPznDkvBye1RhGijy0dVPIYS7quR6AKOjEd 3FYVmv33+CNgtrHUmgUk0n+W3xIrwYzo5QonY5Fwy0Kc+euFc8OdfV9D10TO01sOTH qiBGBiElEGx5ReMbsZ1MEEcoX46n9FLNzS5QLtWXRx33HjsfyVjk5TQ67qhseyj1Xy OGXb6QaZV78nQ== To: 51319@debbugs.gnu.org From: Jean-Baptiste Volatier Subject: [PATCH 0/2] Better interoperability between guix and Julia built-in package manager Message-ID: <20211021130952.14696-1-jbv@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51319 Cc: Jean-Baptiste Volatier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jean-Baptiste Volatier Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) With this patch, when a user install a package using Julia package manager, the package manager finds packages that were already installed in the guix profile and use them. First patch of the serie does the implementation, the second patch is an ex= ample using sundials_jll package. Sundials_jll is a julia package that wraps the sundials library, it is typi= cally not installed on its own but as a dependency of DifferentialEquations.jl for ex= ample. As DifferentialEquations.jl is not currently packaged in julia, a fallback = is to install it with julia package manager. Unfortunately that will also install sundials_jll and downloads some .so that will fail to load on Guix because = of linker incompatilibities. Now with the proposed patch, the user can install sundials_jll using guix, and then julia package manager will use this package instead of downloading= some binary files. As for the patch itself, it works by following more closely the directory structure that Julia expects in JULIA_DEPOT_PATH. Namely the packages subfolder should not contain packages but packages/XXXX/ where XXXX is a string encoding package uuid and sha1 of package files. $JULIA_DEPOT_PATH/packages was also used as JULIA_LOAD_PATH, this will not work anymore as packages are behind a layer of XXXX sub directories. So instead I added a new subfolder $JULIA_DEPOT_PATH/loadpath where the pac= kage is installed and $JULIA_DEPOT_PATH/packages/XXXX is a symlink to it. Jean-Baptiste Volatier (2): build-system/julia: Enable Julia Pkg to find installed packages gnu: Add julia-sundials-jull gnu/packages/julia-jll.scm | 38 +++++++++++++++++++++++++ gnu/packages/julia-xyz.scm | 2 +- gnu/packages/julia.scm | 2 +- gnu/packages/maths.scm | 24 ++++++++++++++++ guix/build/julia-build-system.scm | 46 ++++++++++++++++++++++++++++--- 5 files changed, 106 insertions(+), 6 deletions(-) -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 21 09:10:16 2021 Received: (at 51319) by debbugs.gnu.org; 21 Oct 2021 13:10:16 +0000 Received: from localhost ([127.0.0.1]:56505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdXpo-0008N1-HC for submit@debbugs.gnu.org; Thu, 21 Oct 2021 09:10:16 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:32801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdXpm-0008MM-Hx for 51319@debbugs.gnu.org; Thu, 21 Oct 2021 09:10:15 -0400 Date: Thu, 21 Oct 2021 13:10:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1634821808; bh=xVUwNeSlSC1rt0/YxNCICUoTlJ7mwUEqqw//JzAtab8=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=mD0odhERT5+nI3Kk41NTb3nEhQMjz5rtGhRiittUmb+Y7XaUwO3XNnRLg2rKhsN1F /CFuU1BEbgXwNimf3YKnBTFnSYM41DRBSVc6BKZYY16YUHL8t2rzncwNeL72eNpiVI tx0oInOeZH0AjTR0Nprqk//68OPHruADV6p75nGJi4l6PgZg3qEZ/MdixPiz5hk6U5 fioSOAiFNCx+FmwsioVVZpPu4ybsvIWK5dcPCVJjbL2UNFa1CKVJxcryccFUlcPjjS SMm+TqxmkdsSnbld3DvRW/TU95XDytQmmsUa7+Jwey1+B9dte+LJdDmrsVZWLPgom7 yV6W4dyPtbHuQ== To: 51319@debbugs.gnu.org From: Jean-Baptiste Volatier Subject: [PATCH 2/2] gnu: Add julia-sundials-jull Message-ID: <20211021130952.14696-3-jbv@pm.me> In-Reply-To: <20211021130952.14696-1-jbv@pm.me> References: <20211021130952.14696-1-jbv@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51319 Cc: Jean-Baptiste Volatier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jean-Baptiste Volatier Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/julia-jll.scm (julia-sundials-jll): New variable. * gnu/packages/maths.scm (sundials-julia): New variable. --- gnu/packages/julia-jll.scm | 38 ++++++++++++++++++++++++++++++++++++++ gnu/packages/maths.scm | 24 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/gnu/packages/julia-jll.scm b/gnu/packages/julia-jll.scm index d3677d0a33..e1c33903dd 100644 --- a/gnu/packages/julia-jll.scm +++ b/gnu/packages/julia-jll.scm @@ -2709,3 +2709,41 @@ (define-public julia-zstd-jll (synopsis "Zstd library wrappers") (description "This package provides a wrapper for the zstd library.") (license license:expat))) + +(define-public julia-sundials-jll + (package + (name "julia-sundials-jll") + (version "5.2.1+0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaBinaryWrappers/Sundials_jll.j= l") + (commit (string-append "Sundials-v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0cijb9frq8gj8bjpqf2lr5d0jxlj262y6h6xi4z3536dingrvffc")))= ) + (build-system julia-build-system) + (arguments + '(#:tests? #f ; no runtests + #:phases + (modify-phases %standard-phases + (add-after 'link-depot 'override-binary-path + (lambda* (#:key inputs #:allow-other-keys) + (map + (lambda (wrapper) + (substitute* wrapper + (("global artifact_dir.*") + (string-append + "global artifact_dir =3D \"" + (assoc-ref inputs "sundials") "\"\n")))) + ;; There's a Julia file for each platform, override them al= l + (find-files "src/wrappers/" "\\.jl$"))))))) + (inputs + `(("sundials" ,sundials-julia))) + (propagated-inputs + `(("julia-jllwrappers" ,julia-jllwrappers))) + (home-page "https://github.com/JuliaBinaryWrappers/Sundials_jll.jl") + (synopsis "SUndials library wrappers") + (description "This package provides a wrapper for the sundials library= .") + (license license:expat))) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 038ca5518c..54f44a3b55 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -5943,6 +5943,30 @@ (define-public sundials-openmpi =09 ,%openmpi-setup))))) (synopsis "SUNDIALS with OpenMPI support"))) +(define-public sundials-julia + (package + (inherit sundials) + (name "sundials-julia") + (version "5.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/LLNL/sundials.git") + (commit (string-append "v" version)))) + (sha256 + (base32 + "08q9svjdl6fmqrwyd9p12m98n0wd2lws38yh223wyp6590zi3i49")))) + (inputs + `(("lapack" ,lapack) + ,@(package-inputs sundials))) + (arguments + (substitute-keyword-arguments (package-arguments sundials) + ((#:configure-flags flags '()) + `(cons* "-DLAPACK_ENABLE:BOOL=3DON" + ,flags)))) + (synopsis "SUNDIALS with lapack support as required by julia-sundials-= jll"))) + (define-public combinatorial-blas (package (name "combinatorial-blas") -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 21 09:10:20 2021 Received: (at 51319) by debbugs.gnu.org; 21 Oct 2021 13:10:20 +0000 Received: from localhost ([127.0.0.1]:56507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdXpr-0008NB-Qv for submit@debbugs.gnu.org; Thu, 21 Oct 2021 09:10:20 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:18355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdXpn-0008MV-3U for 51319@debbugs.gnu.org; Thu, 21 Oct 2021 09:10:16 -0400 Date: Thu, 21 Oct 2021 13:09:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1634821804; bh=cEdR2dCvWdAvcCyYVXz5VXAYrVBsAQxdqJl8j64rjac=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=pbz02UYIMykj7eEOIQzUbz+DbjbnkIAGXmXD3yNq3DoFxmPFw4OJ0ju4RWWenUxtL eNOz+UdADI+2imGB3jMG6Kwjo3RARkiibRjBck0/924MN/uK90S1WlFOzkp69i/+Ga ztfxbef9t8TsjFKiTfv4ybv6CO0SAiOoCMzlCNvW0o1EAIPT+7D42wTICmnnCbm5LV l8gB117HAyhxZnjLXQFdfMpevO7CLBppgwLM7oXcmDcb2/EdSIxFwz/Dwy7MHVEXT7 BVhqeqvXQUHj34JHle/DQukzO8FChI2YMF7vMp24mOasoLeE8YSP6SnHk1GGkNlRKZ QCfdsDGaDjLgQ== To: 51319@debbugs.gnu.org From: Jean-Baptiste Volatier Subject: [PATCH 1/2] build-system/julia: Enable Julia Pkg to find installed packages Message-ID: <20211021130952.14696-2-jbv@pm.me> In-Reply-To: <20211021130952.14696-1-jbv@pm.me> References: <20211021130952.14696-1-jbv@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/build/julia-build-system.scm (link-depot): New phase. Julia built-in package manager (Pkg) looks for packages in JULIA_DEPOT_PATH/packages/PACKAGENAME/XXXX where XXXX is a string encoding packa [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [185.70.40.133 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 51319 Cc: Jean-Baptiste Volatier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jean-Baptiste Volatier Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) * guix/build/julia-build-system.scm (link-depot): New phase. Julia built-in package manager (Pkg) looks for packages in JULIA_DEPOT_PATH/packages/PACKAGENAME/XXXX where XXXX is a string encoding package UUID and SHA1 of files. The link-depot phase creates a link at the correct location to allow Pkg to find packages that were already installed by Guix. (%package-path): modified package path from packages/ to loadpath/ (project.toml->uuid): retrive package uuid from TOML file * gnu/packages/julia-xyz.scm: correct paths to reflect change of %package-path * gnu/packages/julia.scm: correct paths to reflect change of %package-path --- gnu/packages/julia-xyz.scm | 2 +- gnu/packages/julia.scm | 2 +- guix/build/julia-build-system.scm | 46 ++++++++++++++++++++++++++++--- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index c1ebc0fba1..1e407a2277 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -4610,7 +4610,7 @@ (define-public julia-uris (lambda* (#:key source outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (chdir - (string-append out "/share/julia/packages/URIs/test"))) + (string-append out "/share/julia/loadpath/URIs/test"))) #t))))) ;; required for tests (inputs `(("julia-json" ,julia-json))) diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index 411f2e2e10..5b9bf91ed6 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -673,7 +673,7 @@ (define-public julia (native-search-paths (list (search-path-specification (variable "JULIA_LOAD_PATH") - (files (list "share/julia/packages/"))) + (files (list "share/julia/loadpath/"))) (search-path-specification (variable "JULIA_DEPOT_PATH") (files (list "share/julia/"))))) diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-sys= tem.scm index d74acf2a05..c7f2119974 100644 --- a/guix/build/julia-build-system.scm +++ b/guix/build/julia-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2019, 2020 Nicol=C3=B2 Balzarotti +;;; Copyright =C2=A9 2021 Jean-Baptiste Volatier ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,10 +21,13 @@ (define-module (guix build julia-build-system) #:use-module ((guix build gnu-build-system) #:prefix gnu:) #:use-module (guix build utils) + #:use-module (rnrs io ports) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 rdelim) + #:use-module (ice-9 popen) #:export (%standard-phases + %package-path julia-create-package-toml julia-build)) @@ -37,7 +41,7 @@ (define (invoke-julia code) (invoke "julia" "-e" code)) ;; subpath where we store the package content -(define %package-path "/share/julia/packages/") +(define %package-path "/share/julia/loadpath/") (define (project.toml->name file) "Look for Julia package name in the TOML file FILE (usually named @@ -51,6 +55,18 @@ (define (project.toml->name file) (if m (match:substring m 1) (loop (read-line in 'concat))))))))) +(define (project.toml->uuid file) + "Look for Julia package uuid in the TOML file FILE (usually named +Project.toml)." + (call-with-input-file file + (lambda (in) + (let loop ((line (read-line in 'concat))) + (if (eof-object? line) + #f + (let ((m (string-match "uuid\\s*=3D\\s*\"(.*)\"" line))) + (if m (match:substring m 1) + (loop (read-line in 'concat))))))))) + (define* (install #:key source inputs outputs julia-package-name #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -73,7 +89,7 @@ (define* (precompile #:key source inputs outputs julia-pa= ckage-name (setenv "JULIA_DEPOT_PATH" builddir) ;; Add new package dir to the load path. (setenv "JULIA_LOAD_PATH" - (string-append builddir "packages/" ":" + (string-append builddir "loadpath/" ":" (or (getenv "JULIA_LOAD_PATH") ""))) ;; Actual precompilation: @@ -97,15 +113,36 @@ (define* (check #:key tests? source inputs outputs jul= ia-package-name (setenv "SOURCE_DATE_EPOCH" "1") (setenv "JULIA_DEPOT_PATH" builddir) (setenv "JULIA_LOAD_PATH" - (string-append builddir "packages/" ":" + (string-append builddir "loadpath/" ":" (or (getenv "JULIA_LOAD_PATH") ""))) (setenv "HOME" "/tmp") (invoke "julia" "--depwarn=3Dyes" - (string-append builddir "packages/" + (string-append builddir "loadpath/" package "/test/runtests.jl")))) #t) +(define* (link-depot #:key source inputs outputs julia-package-name + #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (package-name (or + julia-package-name + (project.toml->name "Project.toml"))) + (package-dir (string-append out %package-path package-name)) + (uuid (project.toml->uuid "Project.toml")) + (pipe (open-pipe* OPEN_READ "julia" "-e" + (format #f "using Pkg; +println(Base.version_slug(Base.UUID(\"~a\"), + Base.SHA1(Pkg.GitTools.tree_hash(\".\"))))" uuid= package-dir))) + (slug (string-trim-right (get-string-all pipe)))) + ;; When installing a package, julia looks first at in the JULIA_DEPOT_= PATH + ;; for a path like packages/PACKAGE/XXXX + ;; Where XXXX is a slug encoding the package UUID and SHA1 of the file= s + ;; Here we create a link with the correct path to enable julia to find= the package + (mkdir-p (string-append out "/share/julia/packages/" package-name)) + (symlink package-dir (string-append out "/share/julia/packages/" packa= ge-name "/" slug))) + #t) + (define (julia-create-package-toml outputs source name uuid version deps) @@ -138,6 +175,7 @@ (define %standard-phases (delete 'check) ; tests must be run after installation (replace 'install install) (add-after 'install 'precompile precompile) + (add-after 'unpack 'link-depot link-depot) (add-after 'install 'check check) ;; TODO: In the future we could add a "system-image-generation" phase ;; where we use PackageCompiler.jl to speed up package loading times -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 08 02:31:12 2021 Received: (at 51319) by debbugs.gnu.org; 8 Nov 2021 07:31:12 +0000 Received: from localhost ([127.0.0.1]:55943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjz7X-0001Es-Q6 for submit@debbugs.gnu.org; Mon, 08 Nov 2021 02:31:12 -0500 Received: from flashner.co.il ([178.62.234.194]:33500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjz7W-0001Ef-3z for 51319@debbugs.gnu.org; Mon, 08 Nov 2021 02:31:11 -0500 Received: from localhost (unknown [141.226.169.107]) by flashner.co.il (Postfix) with ESMTPSA id 2B66D40349; Mon, 8 Nov 2021 07:31:04 +0000 (UTC) Date: Mon, 8 Nov 2021 09:30:31 +0200 From: Efraim Flashner To: Jean-Baptiste Volatier Subject: Re: [bug#51319] [PATCH 1/2] build-system/julia: Enable Julia Pkg to find installed packages Message-ID: Mail-Followup-To: Efraim Flashner , Jean-Baptiste Volatier , 51319@debbugs.gnu.org References: <20211021130952.14696-1-jbv@pm.me> <20211021130952.14696-2-jbv@pm.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+rZxTGDfJO+wrlYC" Content-Disposition: inline In-Reply-To: <20211021130952.14696-2-jbv@pm.me> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Thanks for the patch series! I'm really looking forward to this working out in Guix, being able to use Julia to download as-yet unpackaged julia packages will make using Julia much easier. A couple of comments inline in the patch: Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-Debbugs-Envelope-To: 51319 Cc: 51319@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --+rZxTGDfJO+wrlYC Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for the patch series! I'm really looking forward to this working out in Guix, being able to use Julia to download as-yet unpackaged julia packages will make using Julia much easier. A couple of comments inline in the patch: On Thu, Oct 21, 2021 at 01:09:58PM +0000, Jean-Baptiste Volatier via Guix-p= atches via wrote: > * guix/build/julia-build-system.scm (link-depot): New phase. > Julia built-in package manager (Pkg) looks for packages in > JULIA_DEPOT_PATH/packages/PACKAGENAME/XXXX where XXXX is > a string encoding package UUID and SHA1 of files. > The link-depot phase creates a link at the correct location > to allow Pkg to find packages that were already installed by > Guix. > (%package-path): modified package path from packages/ to > loadpath/ > (project.toml->uuid): retrive package uuid from TOML file >=20 > * gnu/packages/julia-xyz.scm: correct paths to reflect > change of %package-path >=20 > * gnu/packages/julia.scm: correct paths to reflect change of > %package-path > --- > gnu/packages/julia-xyz.scm | 2 +- > gnu/packages/julia.scm | 2 +- > guix/build/julia-build-system.scm | 46 ++++++++++++++++++++++++++++--- > 3 files changed, 44 insertions(+), 6 deletions(-) >=20 > diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm > index c1ebc0fba1..1e407a2277 100644 > --- a/gnu/packages/julia-xyz.scm > +++ b/gnu/packages/julia-xyz.scm > @@ -4610,7 +4610,7 @@ (define-public julia-uris > (lambda* (#:key source outputs #:allow-other-keys) > (let ((out (assoc-ref outputs "out"))) > (chdir > - (string-append out "/share/julia/packages/URIs/test"))) > + (string-append out "/share/julia/loadpath/URIs/test"))) > #t))))) > ;; required for tests > (inputs `(("julia-json" ,julia-json))) > diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm > index 411f2e2e10..5b9bf91ed6 100644 > --- a/gnu/packages/julia.scm > +++ b/gnu/packages/julia.scm > @@ -673,7 +673,7 @@ (define-public julia > (native-search-paths > (list (search-path-specification > (variable "JULIA_LOAD_PATH") > - (files (list "share/julia/packages/"))) > + (files (list "share/julia/loadpath/"))) > (search-path-specification > (variable "JULIA_DEPOT_PATH") > (files (list "share/julia/"))))) > diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-s= ystem.scm > index d74acf2a05..c7f2119974 100644 > --- a/guix/build/julia-build-system.scm > +++ b/guix/build/julia-build-system.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2019, 2020 Nicol=C3=B2 Balzarotti > +;;; Copyright =C2=A9 2021 Jean-Baptiste Volatier > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -20,10 +21,13 @@ > (define-module (guix build julia-build-system) > #:use-module ((guix build gnu-build-system) #:prefix gnu:) > #:use-module (guix build utils) > + #:use-module (rnrs io ports) > #:use-module (ice-9 match) > #:use-module (ice-9 regex) > #:use-module (ice-9 rdelim) > + #:use-module (ice-9 popen) > #:export (%standard-phases > + %package-path > julia-create-package-toml > julia-build)) >=20 > @@ -37,7 +41,7 @@ (define (invoke-julia code) > (invoke "julia" "-e" code)) >=20 > ;; subpath where we store the package content > -(define %package-path "/share/julia/packages/") > +(define %package-path "/share/julia/loadpath/") >=20 > (define (project.toml->name file) > "Look for Julia package name in the TOML file FILE (usually named > @@ -51,6 +55,18 @@ (define (project.toml->name file) > (if m (match:substring m 1) > (loop (read-line in 'concat))))))))) >=20 > +(define (project.toml->uuid file) > + "Look for Julia package uuid in the TOML file FILE (usually named > +Project.toml)." > + (call-with-input-file file > + (lambda (in) > + (let loop ((line (read-line in 'concat))) > + (if (eof-object? line) > + #f > + (let ((m (string-match "uuid\\s*=3D\\s*\"(.*)\"" line))) > + (if m (match:substring m 1) > + (loop (read-line in 'concat))))))))) > + > (define* (install #:key source inputs outputs julia-package-name > #:allow-other-keys) > (let* ((out (assoc-ref outputs "out")) > @@ -73,7 +89,7 @@ (define* (precompile #:key source inputs outputs julia-= package-name > (setenv "JULIA_DEPOT_PATH" builddir) > ;; Add new package dir to the load path. > (setenv "JULIA_LOAD_PATH" > - (string-append builddir "packages/" ":" > + (string-append builddir "loadpath/" ":" > (or (getenv "JULIA_LOAD_PATH") > ""))) > ;; Actual precompilation: > @@ -97,15 +113,36 @@ (define* (check #:key tests? source inputs outputs j= ulia-package-name > (setenv "SOURCE_DATE_EPOCH" "1") > (setenv "JULIA_DEPOT_PATH" builddir) > (setenv "JULIA_LOAD_PATH" > - (string-append builddir "packages/" ":" > + (string-append builddir "loadpath/" ":" > (or (getenv "JULIA_LOAD_PATH") > ""))) > (setenv "HOME" "/tmp") > (invoke "julia" "--depwarn=3Dyes" > - (string-append builddir "packages/" > + (string-append builddir "loadpath/" > package "/test/runtests.jl")))) > #t) >=20 > +(define* (link-depot #:key source inputs outputs julia-package-name > + #:allow-other-keys) I had to wrap this with '(when (file-exists? "Project.toml")' since we do have some packages that pre-date the use of Project.toml. Building julia-bufferedstreams will test both a package with and without a Project.toml. > + (let* ((out (assoc-ref outputs "out")) > + (package-name (or > + julia-package-name > + (project.toml->name "Project.toml"))) > + (package-dir (string-append out %package-path package-name)) > + (uuid (project.toml->uuid "Project.toml")) > + (pipe (open-pipe* OPEN_READ "julia" "-e" > + (format #f "using Pkg; > +println(Base.version_slug(Base.UUID(\"~a\"), > + Base.SHA1(Pkg.GitTools.tree_hash(\".\"))))" uu= id package-dir))) Here you have a '~a' to use uuid but package-dir isn't used anywhere. Is package-dir not needed or is there a missing substitution? > + (slug (string-trim-right (get-string-all pipe)))) > + ;; When installing a package, julia looks first at in the JULIA_DEPO= T_PATH > + ;; for a path like packages/PACKAGE/XXXX > + ;; Where XXXX is a slug encoding the package UUID and SHA1 of the fi= les > + ;; Here we create a link with the correct path to enable julia to fi= nd the package > + (mkdir-p (string-append out "/share/julia/packages/" package-name)) > + (symlink package-dir (string-append out "/share/julia/packages/" pac= kage-name "/" slug))) > + #t) > + > (define (julia-create-package-toml outputs source > name uuid version > deps) > @@ -138,6 +175,7 @@ (define %standard-phases > (delete 'check) ; tests must be run after installation > (replace 'install install) > (add-after 'install 'precompile precompile) > + (add-after 'unpack 'link-depot link-depot) > (add-after 'install 'check check) > ;; TODO: In the future we could add a "system-image-generation" phase > ;; where we use PackageCompiler.jl to speed up package loading times > -- > 2.33.1 >=20 --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --+rZxTGDfJO+wrlYC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmGI0hcACgkQQarn3Mo9 g1FvIxAAh4UeF65a0A6KTwS+RNL6qlEfYbOAfd55vzqYQo+wW2hjIGK7+H6+N9SB mlsrw2nwMnjJmwnEcLrISYk5GaL2JT4oIA4ajzVOhcw3bOgbZcaTLry1loLUPawN jbHQZf6V3U6yd/nbNcMj/vkP1nwPLV42vqBuZMxhRh2ri5r1iJ/PB2xcZRO/U6NW m3h36TLqVKoa6F9xp41rYntrmqZc3Sp+MF2tUKg8/5rwQmcoCArLw/egYm2wI/Bh uQmRq9TOY09doTYCeK6LEw6L3ApE3IcIQmDE7jtvLtYkl8DornJrkDcnkt8pfZ7u CJWtYLKiwT+Z915sWhkJLQwpOo2MUQvpZhZB9gU8Ix7isNhlZz0aWc7EHnbYgiyb qRQsUzF1SO5vR0+i1O1DlGHvy2fv3bmwjFgB/iLg/jTDE1BvjIuTlFLl1XHTXoBq Jxu0Nck+VKTXzQ0c559rKzZ1URXHDJWlWhdKMq87qOsxpm75npnOgq5mdm++bqLH CO1/3FySy1U9Cp9rrxR5AWZDUKU6G9c2WMYzyJU7YrtU21C9MKlQ9wilPP5LpGk9 GjPWk/OqNabtHNnXxetJoXW1OYAKdqPyonVf/0Ztp+/lMbZdwbBeFAvMpdXLaT81 fb2BryQIdqpXDiGOxG6vlwepotByDWm1Kh8oGf7c4k/e+8qTFo8= =KRz2 -----END PGP SIGNATURE----- --+rZxTGDfJO+wrlYC-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 12 09:24:05 2021 Received: (at 51319) by debbugs.gnu.org; 12 Nov 2021 14:24:05 +0000 Received: from localhost ([127.0.0.1]:43771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlXTJ-0001Kz-3M for submit@debbugs.gnu.org; Fri, 12 Nov 2021 09:24:05 -0500 Received: from mail-40134.protonmail.ch ([185.70.40.134]:14178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlXTE-0001KP-UA for 51319@debbugs.gnu.org; Fri, 12 Nov 2021 09:24:03 -0500 Date: Fri, 12 Nov 2021 14:23:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1636727030; bh=4Q4k0jFMmQM6G0DL07g8bUe0blGUT20+oy2jaP5jAsg=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=npw/xsaFQ/Ryeg72q7POdwzQ5Fm/X/TUG3Xlqy8w+EiM/Zprd0jl7NAvIXYR8xLd6 q13peigBzRng1SBCwlCWm9GXIy6j0QOSLHXbuCGmEsSvZPMXmzQwedCsTKdqTAPbLz MVUIfMjqr0yIbbl8cz3MT4fbNzkPnIllXWVlo2oynaUF4PBwyoJDQiOy5DR1JmuWjC gG7ewtRZ88Z+wMFF3RltiCaIyqlsRQxg8fSsl8t2g9KgijV+YiWzOGIrSP3ENdQiYr D6M2EICYujH1OmPseKRyVvfapvr9TP6xPg3aFiTlqWr4CYeBpvcK+bNfl8xECLw+6F 3BGE1j0cmNtIQ== To: 51319@debbugs.gnu.org, efraim@flashner.co.il From: Jean-Baptiste Volatier Subject: [PATCH v2 0/2] Better interoperability between guix and Julia built-in package manager Message-ID: <20211112142328.28400-1-jbv@pm.me> In-Reply-To: References: <20211021130952.14696-1-jbv@pm.me> <20211021130952.14696-2-jbv@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51319 Cc: Jean-Baptiste Volatier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jean-Baptiste Volatier Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Monday, November 8th, 2021 at 8:30 AM, Efraim Flashner wrote: > Thanks for the patch series! I'm really looking forward to this working > out in Guix, being able to use Julia to download as-yet unpackaged julia > packages will make using Julia much easier. Me too! Then we can concentrate first on the JLL packages since source only packages are likely to work as is. I forgot to mention that for this patch to work, the link-depot phase needs to be called before the source is modified. So in this new version, I have modified all packages that where modifiying the source after unpack to do it after link-depot instead. > I had to wrap this with '(when (file-exists? "Project.toml")' since we > do have some packages that pre-date the use of Project.toml. Building > julia-bufferedstreams will test both a package with and without a > Project.toml. I added a julia-package-uuid keyword argument like julia-package-name for packages without a Project.toml. I also modified the packages that needed it. > Here you have a '~a' to use uuid but package-dir isn't used anywhere. Is > package-dir not needed or is there a missing substitution? This was some left over from a previous iteration. Jean-Baptiste Volatier (2): build-system/julia: Enable Julia Pkg to find installed packages gnu: Add julia-sundials-jull gnu/packages/julia-jll.scm | 176 ++++++++++++++++++------------ gnu/packages/julia-xyz.scm | 69 ++++++------ gnu/packages/julia.scm | 2 +- gnu/packages/maths.scm | 24 ++++ guix/build-system/julia.scm | 5 +- guix/build/julia-build-system.scm | 49 ++++++++- 6 files changed, 217 insertions(+), 108 deletions(-) base-commit: 6e67c701a88064babd1aef93b58890aed2dcd0aa -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 12 09:24:15 2021 Received: (at 51319) by debbugs.gnu.org; 12 Nov 2021 14:24:15 +0000 Received: from localhost ([127.0.0.1]:43775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlXTR-0001LI-CS for submit@debbugs.gnu.org; Fri, 12 Nov 2021 09:24:15 -0500 Received: from mail-4322.protonmail.ch ([185.70.43.22]:64443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlXTK-0001KU-4Q for 51319@debbugs.gnu.org; Fri, 12 Nov 2021 09:24:12 -0500 Date: Fri, 12 Nov 2021 14:23:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1636727035; bh=KYLi3pdQqxYwVIaH2Ah8I01SimyA2IYghLFaCuv3PfU=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=njKgw9Wcz78I7w/ewYdxcObr7LPue/0pO0RfQ3Q0/i1YcAA07g20qtnOHC43BdCHc IrrRiNt3wbj4Dz514flhi0LtCHubf2pSjp/3UwdQGMhhxJrk504GAlElyal5OupbqJ 5AKzop5eNZj7HrvkqmaAK0PGLPIHITKG/ECUg5BaZ+LgrBwySvKpV3zTyNqBgU388c jJTuLV1WkmX5yZRq2epiW6xvqKGPvqJJ/XiGcOD2Unvlu72bUO90Ge502mvZ9dzblR GIL6hpRQ3PBMIueaRoZvcRRYRL6IJdVbZXAkHy96pzX96twobk8nxNtz4DyOe29DiM AOqvVW0rf+sFg== To: 51319@debbugs.gnu.org, efraim@flashner.co.il From: Jean-Baptiste Volatier Subject: [PATCH v2 1/2] build-system/julia: Enable Julia Pkg to find installed packages Message-ID: <20211112142328.28400-2-jbv@pm.me> In-Reply-To: <20211112142328.28400-1-jbv@pm.me> References: <20211021130952.14696-1-jbv@pm.me> <20211021130952.14696-2-jbv@pm.me> <20211112142328.28400-1-jbv@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/build/julia-build-system.scm (link-depot): New phase. Julia built-in package manager (Pkg) looks for packages in JULIA_DEPOT_PATH/packages/PACKAGENAME/XXXX where XXXX is a string encoding packa [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [185.70.43.22 listed in wl.mailspike.net] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-Debbugs-Envelope-To: 51319 Cc: Jean-Baptiste Volatier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jean-Baptiste Volatier Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) * guix/build/julia-build-system.scm (link-depot): New phase. Julia built-in package manager (Pkg) looks for packages in JULIA_DEPOT_PATH/packages/PACKAGENAME/XXXX where XXXX is a string encoding package UUID and SHA1 of files. The link-depot phase creates a link at the correct location to allow Pkg to find packages that were already installed by Guix. (%package-path): modified package path from packages/ to loadpath/ (project.toml->uuid): retrive package uuid from TOML file * gnu/packages/julia-xyz.scm: correct paths to reflect change of %package-path modify order of phases as link-depot needs to run on an unmodified src directory add package-name-uuid keyword argument to packages without Project.toml file. * gnu/packages/julia.scm: correct paths to reflect change of %package-path modify order of phases as link-depot needs to run on an unmodified src directory --- gnu/packages/julia-jll.scm | 138 +++++++++++++++--------------- gnu/packages/julia-xyz.scm | 69 ++++++++------- gnu/packages/julia.scm | 2 +- guix/build-system/julia.scm | 5 +- guix/build/julia-build-system.scm | 49 +++++++++-- 5 files changed, 155 insertions(+), 108 deletions(-) diff --git a/gnu/packages/julia-jll.scm b/gnu/packages/julia-jll.scm index 51643819ae..d8cf5b9eaf 100644 --- a/gnu/packages/julia-jll.scm +++ b/gnu/packages/julia-jll.scm @@ -77,7 +77,7 @@ (define-public julia-bzip2-jll '(#:tests? #f ; No runtests.jl #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -117,7 +117,7 @@ (define-public julia-cairo-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -163,7 +163,7 @@ (define-public julia-compilersupportlibraries-jll `(#:tests? #f ; no runtests.jl #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -205,7 +205,7 @@ (define-public julia-expat-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -243,7 +243,7 @@ (define-public julia-ffmpeg-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -292,7 +292,7 @@ (define-public julia-fontconfig-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -335,7 +335,7 @@ (define-public julia-freetype2-jll '(#:tests? #f ; No runtests.jl #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -377,7 +377,7 @@ (define-public julia-fribidi-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -413,7 +413,7 @@ (define-public julia-gettext-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -454,7 +454,7 @@ (define-public julia-glfw-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -497,7 +497,7 @@ (define-public julia-glib-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -541,7 +541,7 @@ (define-public julia-gr-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -590,7 +590,7 @@ (define-public julia-gumbo-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (let ((gumbo (string-append (assoc-ref inputs "gumbo-parser")= ))) (for-each @@ -630,7 +630,7 @@ (define-public julia-imagemagick-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -672,7 +672,7 @@ (define-public julia-jllwrappers '(#:tests? #f #:phases (modify-phases %standard-phases - (add-after 'unpack 'custom-override-path + (add-after 'link-depot 'custom-override-path (lambda* (#:key inputs #:allow-other-keys) ;; Make @generate_wrapper_header take an optional argument th= at ;; guix packagers can pass to override the default "override" @@ -718,7 +718,7 @@ (define-public julia-jpegturbo-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -754,7 +754,7 @@ (define-public julia-lame-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -790,7 +790,7 @@ (define-public julia-libass-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -830,7 +830,7 @@ (define-public julia-libfdk-aac-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -866,7 +866,7 @@ (define-public julia-libffi-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -903,7 +903,7 @@ (define-public julia-libgcrypt-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -942,7 +942,7 @@ (define-public julia-libglvnd-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -980,7 +980,7 @@ (define-public julia-libgpg-error-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1018,7 +1018,7 @@ (define-public julia-libiconv-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1056,7 +1056,7 @@ (define-public julia-libmount-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1095,7 +1095,7 @@ (define-public julia-libpng-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1133,7 +1133,7 @@ (define-public julia-libsass-jll `(#:tests? #f ; no runtests.jl #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1175,7 +1175,7 @@ (define-public julia-libtiff-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1214,7 +1214,7 @@ (define-public julia-libuuid-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1252,7 +1252,7 @@ (define-public julia-libvorbis-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1290,7 +1290,7 @@ (define-public julia-lzo-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1328,7 +1328,7 @@ (define-public julia-mbedtls-jll '(#:tests? #f ; No runtests.jl #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1366,7 +1366,7 @@ (define-public julia-ogg-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1403,7 +1403,7 @@ (define-public julia-openspecfun-jll `(#:tests? #f ; no runtests.jl #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1446,7 +1446,7 @@ (define-public julia-openssl-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1482,7 +1482,7 @@ (define-public julia-opus-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1518,7 +1518,7 @@ (define-public julia-pcre-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1556,7 +1556,7 @@ (define-public julia-pixman-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1594,7 +1594,7 @@ (define-public julia-qt5base-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1645,7 +1645,7 @@ (define-public julia-wayland-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1684,7 +1684,7 @@ (define-public julia-wayland-protocols-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1721,7 +1721,7 @@ (define-public julia-x264-jll `(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (let ((libx264 (assoc-ref inputs "libx264"))) (map @@ -1762,7 +1762,7 @@ (define-public julia-x265-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1798,7 +1798,7 @@ (define-public julia-xkbcommon-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1838,7 +1838,7 @@ (define-public julia-xml2-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1878,7 +1878,7 @@ (define-public julia-xorg-libpthread-stubs-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1915,7 +1915,7 @@ (define-public julia-xorg-libx11-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1953,7 +1953,7 @@ (define-public julia-xorg-libxau-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -1989,7 +1989,7 @@ (define-public julia-xorg-libxcb-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2029,7 +2029,7 @@ (define-public julia-xorg-libxcursor-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2067,7 +2067,7 @@ (define-public julia-xorg-libxdmcp-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2103,7 +2103,7 @@ (define-public julia-xorg-libxext-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2140,7 +2140,7 @@ (define-public julia-xorg-libxfixes-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2177,7 +2177,7 @@ (define-public julia-xorg-libxi-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2215,7 +2215,7 @@ (define-public julia-xorg-libxinerama-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2252,7 +2252,7 @@ (define-public julia-xorg-libxkbfile-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2289,7 +2289,7 @@ (define-public julia-xorg-libxrandr-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2327,7 +2327,7 @@ (define-public julia-xorg-libxrender-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2364,7 +2364,7 @@ (define-public julia-xorg-xcb-util-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2401,7 +2401,7 @@ (define-public julia-xorg-xcb-util-image-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2438,7 +2438,7 @@ (define-public julia-xorg-xcb-util-keysyms-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2475,7 +2475,7 @@ (define-public julia-xorg-xcb-util-renderutil-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2512,7 +2512,7 @@ (define-public julia-xorg-xcb-util-wm-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2549,7 +2549,7 @@ (define-public julia-xorg-xkbcomp-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2586,7 +2586,7 @@ (define-public julia-xorg-xkeyboard-config-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2623,7 +2623,7 @@ (define-public julia-xorg-xtrans-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2659,7 +2659,7 @@ (define-public julia-xslt-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2702,7 +2702,7 @@ (define-public julia-zlib-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) @@ -2740,7 +2740,7 @@ (define-public julia-zstd-jll '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases - (add-after 'unpack 'override-binary-path + (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm index 93fadf318c..73768317b8 100644 --- a/gnu/packages/julia-xyz.scm +++ b/gnu/packages/julia-xyz.scm @@ -410,7 +410,8 @@ (define-public julia-bufferedstreams ;; https://travis-ci.org/BioJulia/BufferedStreams.jl/jobs/491050182 (arguments '(#:tests? #f - #:julia-package-name "BufferedStreams")) + #:julia-package-name "BufferedStreams" + #:julia-package-uuid "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d")) (propagated-inputs `(("julia-compat" ,julia-compat))) (home-page "https://github.com/BioJulia/BufferedStreams.jl") (synopsis "Fast composable IO streams") @@ -778,12 +779,12 @@ (define-public julia-configurations (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-tests + (add-after 'link-depot 'fix-tests (lambda _ (substitute* "test/runtests.jl" (("option.toml") "test/option.toml")) #t)) - (add-after 'unpack 'dont-use-exproniconlite + (add-after 'link-depot 'dont-use-exproniconlite (lambda _ (substitute* '("Project.toml" "src/Configurations.jl" @@ -919,7 +920,7 @@ (define-public julia-dataframes (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-failing-test + (add-after 'link-depot 'skip-failing-test (lambda _ ;; Tests with non-standard colors. (substitute* "test/show.jl" @@ -1022,7 +1023,7 @@ (define-public julia-datavalues `(#:tests? #f ; Tests need upgrading with newer Julia version. #:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-known-failing-tests + (add-after 'link-depot 'skip-known-failing-tests (lambda _ ;; See upstream report: ;; https://github.com/queryverse/DataValues.jl/issues/83 @@ -1100,7 +1101,7 @@ (define-public julia-distances (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-flakey-tests + (add-after 'link-depot 'skip-flakey-tests (lambda _ ;; Some combination of these tests fail nondeterministically ;; each of the times this package is built. @@ -1166,14 +1167,14 @@ (define-public julia-documenter (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-source + (add-after 'link-depot 'patch-source (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/Deps.jl" (("pip install") (string-append (assoc-ref inputs "python") "/bin/pip install"))) #t)) - (add-after 'unpack 'remove-javascript-downloads + (add-after 'link-depot 'remove-javascript-downloads (lambda _ (substitute* "src/Writers/HTMLWriter.jl" (("cdnjs.cloudflare.com") "example.com")) @@ -1352,7 +1353,7 @@ (define-public julia-dualnumbers (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'adjust-test-suite + (add-after 'link-depot 'adjust-test-suite (lambda _ (substitute* "test/runtests.jl" ;; Seems to not play nicely with SpecialFunctions @@ -1386,7 +1387,7 @@ (define-public julia-ellipsisnotation (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'adjust-test-suite + (add-after 'link-depot 'adjust-test-suite (lambda _ (substitute* "test/runtests.jl" ;; Seems to not play nicely with Julia-1.6. @@ -1438,7 +1439,7 @@ (define-public julia-expronicon (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-network-tests + (add-after 'link-depot 'skip-network-tests (lambda _ (substitute* "test/runtests.jl" ;; This test tries to access the Julia package registry. @@ -1517,7 +1518,7 @@ (define-public julia-fileio `(#:phases (modify-phases %standard-phases (delete 'reset-gzip-timestamps) - (add-after 'unpack 'skip-network-tests + (add-after 'link-depot 'skip-network-tests (lambda _ ;; These tests try to download audio/video files. (substitute* "test/query.jl" @@ -1677,7 +1678,7 @@ (define-public julia-fixedpointnumbers (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'disable-failing-test + (add-after 'link-depot 'disable-failing-test (lambda* (#:key outputs #:allow-other-keys) (substitute* "test/fixed.jl" ;; A deprecation warning is not thrown @@ -1764,7 +1765,7 @@ (define-public julia-functionwrappers (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'adjust-tests + (add-after 'link-depot 'adjust-tests (lambda _ (substitute* "test/runtests.jl" (("testset \\\"Abstract.*" all) @@ -1817,7 +1818,7 @@ (define-public julia-fuzzycompletions (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-failing-test + (add-after 'link-depot 'skip-failing-test (lambda _ (substitute* "test/runtests.jl" ((".*RPLE.*") ""))))))) @@ -1844,7 +1845,7 @@ (define-public julia-genericlinearalgebra (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'adjust-test-suite + (add-after 'link-depot 'adjust-test-suite (lambda _ (substitute* "test/runtests.jl" ((".*lapack.*") ""))))))) @@ -1875,7 +1876,7 @@ (define-public julia-genericschur (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'adjust-test-suite + (add-after 'link-depot 'adjust-test-suite (lambda _ (substitute* "test/complex.jl" ;; expected Array{Int32,1}, got a value of type Array{Int64= ,1} @@ -1912,13 +1913,13 @@ (define-public julia-geometrybasics (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-earcut + (add-after 'link-depot 'remove-earcut (lambda _ (substitute* '("Project.toml" "src/GeometryBasics.jl") ((".*EarCut.*") "")) #t)) - (add-after 'unpack 'skip-incompatible-test + (add-after 'link-depot 'skip-incompatible-test (lambda _ (substitute* "test/runtests.jl" (("@testset.*MetaT and heterogeneous data.*" all) @@ -2268,7 +2269,7 @@ (define-public julia-imagemagick (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-failing-test + (add-after 'link-depot 'skip-failing-test (lambda _ ;; These tests try to download from the imagemagick.org (substitute* "test/runtests.jl" @@ -2465,7 +2466,7 @@ (define-public julia-infinity (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-timezones.jl + (add-after 'link-depot 'remove-timezones.jl (lambda _ (substitute* "test/runtests.jl" (("using TimeZones.*") "") @@ -2864,7 +2865,7 @@ (define-public julia-matrixfactorizations (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-failing-test + (add-after 'link-depot 'skip-failing-test (lambda _ ;; Tests with math functions are hard. (substitute* "test/test_ul.jl" @@ -2981,7 +2982,8 @@ (define-public julia-media (build-system julia-build-system) ;; Package without Project.toml (arguments - '(#:julia-package-name "Media")) + '(#:julia-package-name "Media" + #:julia-package-uuid "e89f7d12-3494-54d1-8411-f7d8b9ae1f27")) (propagated-inputs `(("julia-macrotools" ,julia-macrotools))) (home-page "https://github.com/JunoLab/Media.jl") @@ -3202,7 +3204,7 @@ (define-public julia-nnlib (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-cuda-tests + (add-after 'link-depot 'skip-cuda-tests (lambda _ (substitute* "test/runtests.jl" (("using CUDA") "") @@ -3238,7 +3240,8 @@ (define-public julia-optimtestproblems (base32 "10h47x5ws42pkqjccimaz0yxfvz41w0yazq6inamfk4lg5g2g3d9")))= ) (build-system julia-build-system) (arguments - `(#:julia-package-name "OptimTestProblems")) + `(#:julia-package-name "OptimTestProblems" + #:julia-package-uuid "cec144fc-5a64-5bc6-99fb-dde8f63e154c")) (home-page "https://github.com/JuliaNLSolvers/OptimTestProblems.jl") (synopsis "Collection of optimization test problems") (description "The purpose of this package is to provide test problems = for @@ -3528,7 +3531,7 @@ (define-public julia-prettytables (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-color-tests + (add-after 'link-depot 'skip-color-tests (lambda _ (substitute* "test/text_backend.jl" ((".*colors\\.jl.*") "")) @@ -3567,7 +3570,7 @@ (define-public julia-pycall ((guix build python-build-system) #:prefix python:)) #:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-conda + (add-after 'link-depot 'remove-conda (lambda _ (substitute* "Project.toml" ((".*Conda.*") "")) @@ -3577,7 +3580,7 @@ (define-public julia-pycall (substitute* "deps/depsutils.jl" (("Conda.PYTHONDIR") "\"/\"")) #t)) - (add-after 'unpack 'set-python + (add-after 'link-depot 'set-python (lambda* (#:key inputs outputs #:allow-other-keys) (let ((python (assoc-ref inputs "python"))) (setenv "PYCALL_JL_RUNTIME_PYTHON" @@ -3690,7 +3693,7 @@ (define-public julia-quadmath (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'hardcode-libmath-location + (add-after 'link-depot 'hardcode-libmath-location (lambda* (#:key inputs #:allow-other-keys) (let ((gcclib (assoc-ref inputs "gcc:lib"))) (substitute* "src/Quadmath.jl" @@ -4082,7 +4085,8 @@ (define-public julia-safetestsets (base32 "1fb1dfdmiw2ggx60hf70954xlps0r48fcb3k3dvxynlz7ylphp96")= ))) (build-system julia-build-system) (arguments - `(#:julia-package-name "SafeTestsets")) + `(#:julia-package-name "SafeTestsets" + #:julia-package-uuid "1bc83da4-3b8d-516f-aca4-4fe02f6d838f")) (native-inputs `(("julia-staticarrays" ,julia-staticarrays))) (home-page "https://github.com/YingboMa/SafeTestsets.jl") @@ -4308,7 +4312,7 @@ (define-public julia-stackviews (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'skip-doctest + (add-after 'link-depot 'skip-doctest (lambda _ (substitute* "test/runtests.jl" ((".*doctest.*") "")) @@ -4811,6 +4815,7 @@ (define-public julia-uris (build-system julia-build-system) (arguments '(#:julia-package-name "URIs" ;required to run tests + #:julia-package-uuid "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" #:phases (modify-phases %standard-phases (add-before 'check 'change-dir @@ -4818,7 +4823,7 @@ (define-public julia-uris (lambda* (#:key source outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (chdir - (string-append out "/share/julia/packages/URIs/test"))) + (string-append out "/share/julia/loadpath/URIs/test"))) #t))))) ;; required for tests (inputs `(("julia-json" ,julia-json))) diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index fe31e545c9..8bf2c8e25e 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -670,7 +670,7 @@ (define-public julia (native-search-paths (list (search-path-specification (variable "JULIA_LOAD_PATH") - (files (list "share/julia/packages/"))) + (files (list "share/julia/loadpath/"))) (search-path-specification (variable "JULIA_DEPOT_PATH") (files (list "share/julia/"))))) diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm index 63cb7cd864..8ceac090c7 100644 --- a/guix/build-system/julia.scm +++ b/guix/build-system/julia.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2019 Nicol=C3=B2 Balzarotti +;;; Copyright =C2=A9 2021 Jean-Baptiste Volatier ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,6 +84,7 @@ (define* (julia-build store name inputs (system (%current-system)) (guile #f) (julia-package-name #f) + (julia-package-uuid #f) (imported-modules %julia-build-system-modules) (modules '((guix build julia-build-system) (guix build utils)))) @@ -105,7 +107,8 @@ (define builder #:search-paths ',(map search-path-specification->sexp search-paths) #:inputs %build-inputs - #:julia-package-name ,julia-package-name))) + #:julia-package-name ,julia-package-name + #:julia-package-uuid ,julia-package-uuid))) (define guile-for-build (match guile diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-sys= tem.scm index d74acf2a05..a23f241ba6 100644 --- a/guix/build/julia-build-system.scm +++ b/guix/build/julia-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2019, 2020 Nicol=C3=B2 Balzarotti +;;; Copyright =C2=A9 2021 Jean-Baptiste Volatier ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,10 +21,13 @@ (define-module (guix build julia-build-system) #:use-module ((guix build gnu-build-system) #:prefix gnu:) #:use-module (guix build utils) + #:use-module (rnrs io ports) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 rdelim) + #:use-module (ice-9 popen) #:export (%standard-phases + %package-path julia-create-package-toml julia-build)) @@ -37,7 +41,7 @@ (define (invoke-julia code) (invoke "julia" "-e" code)) ;; subpath where we store the package content -(define %package-path "/share/julia/packages/") +(define %package-path "/share/julia/loadpath/") (define (project.toml->name file) "Look for Julia package name in the TOML file FILE (usually named @@ -51,6 +55,18 @@ (define (project.toml->name file) (if m (match:substring m 1) (loop (read-line in 'concat))))))))) +(define (project.toml->uuid file) + "Look for Julia package uuid in the TOML file FILE (usually named +Project.toml)." + (call-with-input-file file + (lambda (in) + (let loop ((line (read-line in 'concat))) + (if (eof-object? line) + #f + (let ((m (string-match "uuid\\s*=3D\\s*\"(.*)\"" line))) + (if m (match:substring m 1) + (loop (read-line in 'concat))))))))) + (define* (install #:key source inputs outputs julia-package-name #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -73,7 +89,7 @@ (define* (precompile #:key source inputs outputs julia-pa= ckage-name (setenv "JULIA_DEPOT_PATH" builddir) ;; Add new package dir to the load path. (setenv "JULIA_LOAD_PATH" - (string-append builddir "packages/" ":" + (string-append builddir "loadpath/" ":" (or (getenv "JULIA_LOAD_PATH") ""))) ;; Actual precompilation: @@ -97,15 +113,36 @@ (define* (check #:key tests? source inputs outputs jul= ia-package-name (setenv "SOURCE_DATE_EPOCH" "1") (setenv "JULIA_DEPOT_PATH" builddir) (setenv "JULIA_LOAD_PATH" - (string-append builddir "packages/" ":" + (string-append builddir "loadpath/" ":" (or (getenv "JULIA_LOAD_PATH") ""))) (setenv "HOME" "/tmp") (invoke "julia" "--depwarn=3Dyes" - (string-append builddir "packages/" + (string-append builddir "loadpath/" package "/test/runtests.jl")))) #t) +(define* (link-depot #:key source inputs outputs julia-package-name julia-= package-uuid + #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (package-name (or + julia-package-name + (project.toml->name "Project.toml"))) + (package-dir (string-append out %package-path package-name)) + (uuid (or julia-package-uuid (project.toml->uuid "Project.toml"))= ) + (pipe (open-pipe* OPEN_READ "julia" "-e" + (format #f "using Pkg; +println(Base.version_slug(Base.UUID(\"~a\"), + Base.SHA1(Pkg.GitTools.tree_hash(\".\"))))" uuid= ))) + (slug (string-trim-right (get-string-all pipe)))) + ;; When installing a package, julia looks first at in the JULIA_DEPOT_= PATH + ;; for a path like packages/PACKAGE/XXXX + ;; Where XXXX is a slug encoding the package UUID and SHA1 of the file= s + ;; Here we create a link with the correct path to enable julia to find= the package + (mkdir-p (string-append out "/share/julia/packages/" package-name)) + (symlink package-dir (string-append out "/share/julia/packages/" packa= ge-name "/" slug))) + #t) + (define (julia-create-package-toml outputs source name uuid version deps) @@ -138,6 +175,7 @@ (define %standard-phases (delete 'check) ; tests must be run after installation (replace 'install install) (add-after 'install 'precompile precompile) + (add-after 'unpack 'link-depot link-depot) (add-after 'install 'check check) ;; TODO: In the future we could add a "system-image-generation" phase ;; where we use PackageCompiler.jl to speed up package loading times @@ -146,11 +184,12 @@ (define %standard-phases (delete 'patch-usr-bin-file) (delete 'build))) -(define* (julia-build #:key inputs julia-package-name +(define* (julia-build #:key inputs julia-package-name julia-package-uuid (phases %standard-phases) #:allow-other-keys #:rest args) "Build the given Julia package, applying all of PHASES in order." (apply gnu:gnu-build #:inputs inputs #:phases phases #:julia-package-name julia-package-name + #:julia-package-uuid julia-package-uuid args)) -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 12 09:24:29 2021 Received: (at 51319) by debbugs.gnu.org; 12 Nov 2021 14:24:29 +0000 Received: from localhost ([127.0.0.1]:43779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlXTh-0001Lm-75 for submit@debbugs.gnu.org; Fri, 12 Nov 2021 09:24:29 -0500 Received: from mail-40134.protonmail.ch ([185.70.40.134]:40934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlXTe-0001LY-LQ for 51319@debbugs.gnu.org; Fri, 12 Nov 2021 09:24:27 -0500 Date: Fri, 12 Nov 2021 14:24:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1636727056; bh=tN4ewNESNNzZ+umtys8UM9SEIyVtQ6BrbPTO8tWVUSk=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=drt9wD6ynPQLjh40mn4xkZ+Vu300lJ0htLhc7vfP0OtJuKK/YaVoE+0JQZYDBAmZD QhCRDKw8YImJcN2LeNeci5/dfG0aje1GYHGbg4E6c0N72RQaBl8tztKNplXwLhftyA KmEGyFcPViQSmBNSJ4gEkktyn4kkIi0auDxcfLriWmyLuEeIAXueb57ihyIGBvgtlX 3cmCfmy63977bfOIomAtbMJKD8ZcJlHSbJ5lo+HWDPtuUm2PlT0zAub+Sgc7MhZEqJ 22eNId95HNeKi4/7irxvX3Y8+fw4rfT22C9kwEArzN4vMnZ4VQ0JpXrHHD1fS42EYy I2VWK3z70F8Fg== To: 51319@debbugs.gnu.org, efraim@flashner.co.il From: Jean-Baptiste Volatier Subject: [PATCH v2 2/2] gnu: Add julia-sundials-jull Message-ID: <20211112142328.28400-3-jbv@pm.me> In-Reply-To: <20211112142328.28400-1-jbv@pm.me> References: <20211021130952.14696-1-jbv@pm.me> <20211021130952.14696-2-jbv@pm.me> <20211112142328.28400-1-jbv@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51319 Cc: Jean-Baptiste Volatier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jean-Baptiste Volatier Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/julia-jll.scm (julia-sundials-jll): New variable. * gnu/packages/maths.scm (sundials-julia): New variable. --- gnu/packages/julia-jll.scm | 38 ++++++++++++++++++++++++++++++++++++++ gnu/packages/maths.scm | 24 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/gnu/packages/julia-jll.scm b/gnu/packages/julia-jll.scm index d8cf5b9eaf..097d2f1123 100644 --- a/gnu/packages/julia-jll.scm +++ b/gnu/packages/julia-jll.scm @@ -2759,3 +2759,41 @@ (define-public julia-zstd-jll (synopsis "Zstd library wrappers") (description "This package provides a wrapper for the zstd library.") (license license:expat))) + +(define-public julia-sundials-jll + (package + (name "julia-sundials-jll") + (version "5.2.1+0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JuliaBinaryWrappers/Sundials_jll.j= l") + (commit (string-append "Sundials-v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0cijb9frq8gj8bjpqf2lr5d0jxlj262y6h6xi4z3536dingrvffc")))= ) + (build-system julia-build-system) + (arguments + '(#:tests? #f ; no runtests + #:phases + (modify-phases %standard-phases + (add-after 'link-depot 'override-binary-path + (lambda* (#:key inputs #:allow-other-keys) + (map + (lambda (wrapper) + (substitute* wrapper + (("global artifact_dir.*") + (string-append + "global artifact_dir =3D \"" + (assoc-ref inputs "sundials") "\"\n")))) + ;; There's a Julia file for each platform, override them al= l + (find-files "src/wrappers/" "\\.jl$"))))))) + (inputs + `(("sundials" ,sundials-julia))) + (propagated-inputs + `(("julia-jllwrappers" ,julia-jllwrappers))) + (home-page "https://github.com/JuliaBinaryWrappers/Sundials_jll.jl") + (synopsis "SUndials library wrappers") + (description "This package provides a wrapper for the sundials library= .") + (license license:expat))) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 5152fe6942..eba45cd6b6 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -6159,6 +6159,30 @@ (define-public sundials-openmpi =09 ,%openmpi-setup))))) (synopsis "SUNDIALS with OpenMPI support"))) +(define-public sundials-julia + (package + (inherit sundials) + (name "sundials-julia") + (version "5.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/LLNL/sundials.git") + (commit (string-append "v" version)))) + (sha256 + (base32 + "08q9svjdl6fmqrwyd9p12m98n0wd2lws38yh223wyp6590zi3i49")))) + (inputs + `(("lapack" ,lapack) + ,@(package-inputs sundials))) + (arguments + (substitute-keyword-arguments (package-arguments sundials) + ((#:configure-flags flags '()) + `(cons* "-DLAPACK_ENABLE:BOOL=3DON" + ,flags)))) + (synopsis "SUNDIALS with lapack support as required by julia-sundials-= jll"))) + (define-public combinatorial-blas (package (name "combinatorial-blas") -- 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 09 18:33:35 2022 Received: (at 51319) by debbugs.gnu.org; 9 Mar 2022 23:33:35 +0000 Received: from localhost ([127.0.0.1]:32835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nS5oF-00073G-51 for submit@debbugs.gnu.org; Wed, 09 Mar 2022 18:33:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nS5oC-000732-Hd for 51319@debbugs.gnu.org; Wed, 09 Mar 2022 18:33:33 -0500 Received: from [2001:470:142:3::e] (port=46380 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nS5o6-0002lg-Vi; Wed, 09 Mar 2022 18:33:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=q1f5d3T2+ShCFzCUKgA8WYTAGLPdHwfDcC7BcaLA8ig=; b=IwMlZ/TtG8rSOo5IfinP w2e1GZfyy8ksqMJrRXK7OMzm2WvVP2b8Yd40O4Tv+F/chb5S+u6xCr2e/7fG8sjx9OB16VSSTWLfT FhpSAxojUZ8P9a6/Zdxp//wz/5aBys0CdyHfY8X50iuFJc1uq70r0T9lZjT9rUe+iyo4DOUKq5VR4 XoiVqd2iGpriVyw1l6qae7CjAmR3bFWCoI7NbTRR2aJ5jxFTXCNL7CvLYw5LhGT4aeUBYOfaFLg+d /Vh4nLChqjqH2IRGqJlr4aeRyFQ1Y61sBuCNvC+rTYXh4HwhyrUKRFKx5CeSRwGaYpjoINd+hP8z3 9JA6EKxfU+k/Lg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:64782 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nS5o6-0008CV-IF; Wed, 09 Mar 2022 18:33:26 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: efraim@flashner.co.il, zimoun Subject: Re: bug#51319: [PATCH 0/2] Better interoperability between guix and Julia built-in package manager References: <20211021130952.14696-1-jbv@pm.me> <20211021130952.14696-2-jbv@pm.me> <20211112142328.28400-1-jbv@pm.me> Date: Thu, 10 Mar 2022 00:33:24 +0100 In-Reply-To: <20211112142328.28400-1-jbv@pm.me> (Jean-Baptiste Volatier's message of "Fri, 12 Nov 2021 14:23:46 +0000") Message-ID: <87sfrq1z23.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51319 Cc: 51319@debbugs.gnu.org, Jean-Baptiste Volatier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Efraim, zimoun: I just stumbled upon this patch series by Jean-Baptiste, which seems to have fallen through the cracks: https://issues.guix.gnu.org/51319 Could you take a look and apply them if appropriate? Thanks in advance! Ludo=E2=80=99. Jean-Baptiste Volatier skribis: > On Monday, November 8th, 2021 at 8:30 AM, Efraim Flashner wrote: > >> Thanks for the patch series! I'm really looking forward to this working >> out in Guix, being able to use Julia to download as-yet unpackaged julia >> packages will make using Julia much easier. > > Me too! Then we can concentrate first on the JLL packages since > source only packages are likely to work as is. > > I forgot to mention that for this patch to work, the link-depot > phase needs to be called before the source is modified. > So in this new version, I have modified all packages that where > modifiying the source after unpack to do it after link-depot instead. > >> I had to wrap this with '(when (file-exists? "Project.toml")' since we >> do have some packages that pre-date the use of Project.toml. Building >> julia-bufferedstreams will test both a package with and without a >> Project.toml. > > I added a julia-package-uuid keyword argument like julia-package-name > for packages without a Project.toml. I also modified the packages > that needed it. > >> Here you have a '~a' to use uuid but package-dir isn't used anywhere. Is >> package-dir not needed or is there a missing substitution? > > This was some left over from a previous iteration. > > > Jean-Baptiste Volatier (2): > build-system/julia: Enable Julia Pkg to find installed packages > gnu: Add julia-sundials-jull > > gnu/packages/julia-jll.scm | 176 ++++++++++++++++++------------ > gnu/packages/julia-xyz.scm | 69 ++++++------ > gnu/packages/julia.scm | 2 +- > gnu/packages/maths.scm | 24 ++++ > guix/build-system/julia.scm | 5 +- > guix/build/julia-build-system.scm | 49 ++++++++- > 6 files changed, 217 insertions(+), 108 deletions(-) > > > base-commit: 6e67c701a88064babd1aef93b58890aed2dcd0aa > -- > 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 09 18:59:47 2022 Received: (at 51319-done) by debbugs.gnu.org; 9 Mar 2022 23:59:47 +0000 Received: from localhost ([127.0.0.1]:32852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nS6Db-0001Tz-DA for submit@debbugs.gnu.org; Wed, 09 Mar 2022 18:59:47 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:35419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nS6Da-0001Tn-0S for 51319-done@debbugs.gnu.org; Wed, 09 Mar 2022 18:59:46 -0500 Received: by mail-wm1-f49.google.com with SMTP id v2-20020a7bcb42000000b0037b9d960079so4437609wmj.0 for <51319-done@debbugs.gnu.org>; Wed, 09 Mar 2022 15:59:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=aJGQHlYZEclvKEzdKstrGQysM7PrlrWonqM+81CGiRg=; b=XYOmNpV39iQA/cf7AmRjEh/nW+3NcFysCaDSL7ojxmZNP2XE4NjH7WGlXIJARI5PdA wAjhdWPpHV/S+39T2OVua1ZyleGyUx7FMN9f6O5UMCOTbqpYLBS63kY2wRsKzfvt++/7 KM3Gf0vktXoDd6fr62H43aHPzc5Fq2ODkZ/0fRJIgZIelwavu4MWJe5cJNWKyB/8vRAV n5NP58u5xe1cDagtpJjen5yzqrTXJ0R5FLkkekf5lJhVDEq3h3wxwnHmkPzpyO/xEl4m AmMAZmyCWtA6Dt/dnMYx00P4oyTfUrNtfvOpH3IKgLyMwOuoNWkquk50smJHb9odPjlJ jGEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=aJGQHlYZEclvKEzdKstrGQysM7PrlrWonqM+81CGiRg=; b=NUcafEjVoabwxrrtIaMI8yq8N7no2PKGgEbC3U6pmtTr+jvmizzcgsGn+XJvc0CLBb YXMFOnsZKRmBjV2MysARXGOQFEO4RnEKF8FASuc3prp1oGmwC7y17bVo3qSMtEJgq9rB BVd8VKndtZnirfcjplrTFL4lInBJWTJSoDk+fA6L1if2RfcR355IMGoOr7mc2Dv35hNT Ucaby82s7t5knK35webI0CFeL1ymR0QpZmm0ANZ/YR1Yoj8v+f7pjXt2AeT63Oq1e3Rt SX3hELXxwklvoJzXytWovqUyoF1DFmjCltlKnrGRh7KbMabhajZ9JFUOufvxSJ13/BIA O3yQ== X-Gm-Message-State: AOAM531M0Fp8DdZkCLGYkbVnQn3NE445rb4elZ0qZYlk6LWmlK2PUhYL VoslvuqEVA3Dq6SJHQnbn/I= X-Google-Smtp-Source: ABdhPJyQpeWI/+JzfTPv6kH/OIIMiFWyeQ52pegVVO1C0t4bdep033UIuj+cgDcOb15akp9FgN5Jjg== X-Received: by 2002:a05:600c:1906:b0:389:a5c0:23cb with SMTP id j6-20020a05600c190600b00389a5c023cbmr9415616wmq.96.1646870379925; Wed, 09 Mar 2022 15:59:39 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id f11-20020a7bcc0b000000b0037e0c362b6dsm2936547wmh.31.2022.03.09.15.59.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 15:59:39 -0800 (PST) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#51319: [PATCH 0/2] Better interoperability between guix and Julia built-in package manager References: <20211021130952.14696-1-jbv@pm.me> <20211021130952.14696-2-jbv@pm.me> <20211112142328.28400-1-jbv@pm.me> <87sfrq1z23.fsf_-_@gnu.org> Date: Thu, 10 Mar 2022 00:59:35 +0100 In-Reply-To: <87sfrq1z23.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 10 Mar 2022 00:33:24 +0100") Message-ID: <86pmmusmmw.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51319-done Cc: 51319-done@debbugs.gnu.org, Jean-Baptiste Volatier , efraim@flashner.co.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Thu, 10 Mar 2022 at 00:33, Ludovic Court=C3=A8s wrote: > https://issues.guix.gnu.org/51319 > > Could you take a look and apply them if appropriate? >From my understanding, already applied with 3af351a7de41b8d50f27f3623c46392f571b9a4e and 546f8537aad3ac03fef43e036d3cab3abc943915. Therefore, I am closing. Thanks for taking care. Cheers, simon PS: The feature pointed in the Guix-HPC report, IIRC. ;-) From unknown Fri Jun 20 07:12:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Apr 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator