From patchwork Thu Oct 21 13:06:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Baptiste Volatier X-Patchwork-Id: 404 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8D8E027BBE3; Thu, 21 Oct 2021 14:08:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5531027BBE1 for ; Thu, 21 Oct 2021 14:08:14 +0100 (BST) Received: from localhost ([::1]:46778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdXno-0002L0-41 for patchwork@mira.cbaines.net; Thu, 21 Oct 2021 09:08:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdXne-0002JQ-Md for guix-patches@gnu.org; Thu, 21 Oct 2021 09:08:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44942) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdXne-0004Tz-7q for guix-patches@gnu.org; Thu, 21 Oct 2021 09:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdXne-0008Hh-32 for guix-patches@gnu.org; Thu, 21 Oct 2021 09:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51319] [PATCH 0/2] Better interoperability between guix and Julia built-in package manager Resent-From: Jean-Baptiste Volatier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Oct 2021 13:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51319 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51319@debbugs.gnu.org Cc: Jean-Baptiste Volatier X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163482163931774 (code B ref -1); Thu, 21 Oct 2021 13:08:01 +0000 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== Message-ID: <20211021130648.14594-1-jbv@pm.me> MIME-Version: 1.0 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Jean-Baptiste Volatier X-ACL-Warn: , Jean-Baptiste Volatier via Guix-patches X-Patchwork-Original-From: Jean-Baptiste Volatier via Guix-patches via From: Jean-Baptiste Volatier X-getmail-retrieved-from-mailbox: Patches 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 example using sundials_jll package. Sundials_jll is a julia package that wraps the sundials library, it is typically not installed on its own but as a dependency of DifferentialEquations.jl for example. 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 package 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