From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SJ4LMTE7FmJgMAAAgWs5BA (envelope-from ) for ; Wed, 23 Feb 2022 14:48:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6Go9LjE7FmKtmQAA9RJhRA (envelope-from ) for ; Wed, 23 Feb 2022 14:48:33 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 25E7613DCC for ; Wed, 23 Feb 2022 14:48:33 +0100 (CET) Received: from localhost ([::1]:47590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMs0O-0003h8-AS for larch@yhetil.org; Wed, 23 Feb 2022 08:48:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMrzu-00035n-DU for guix-patches@gnu.org; Wed, 23 Feb 2022 08:48:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMrzu-0004uW-36 for guix-patches@gnu.org; Wed, 23 Feb 2022 08:48:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nMrzt-0004hv-Jg for guix-patches@gnu.org; Wed, 23 Feb 2022 08:48:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54088] [PATCH v2 02/19] build: julia: Add 'julia-package-dependencies' as keyword. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Feb 2022 13:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54088 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54088@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 54088-submit@debbugs.gnu.org id=B54088.164562406517914 (code B ref 54088); Wed, 23 Feb 2022 13:48:01 +0000 Received: (at 54088) by debbugs.gnu.org; 23 Feb 2022 13:47:45 +0000 Received: from localhost ([127.0.0.1]:44308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMrzb-0004ee-Uu for submit@debbugs.gnu.org; Wed, 23 Feb 2022 08:47:44 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:34081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMrzZ-0004b5-EF for 54088@debbugs.gnu.org; Wed, 23 Feb 2022 08:47:42 -0500 Received: by mail-wm1-f48.google.com with SMTP id l2-20020a7bc342000000b0037fa585de26so2383134wmj.1 for <54088@debbugs.gnu.org>; Wed, 23 Feb 2022 05:47:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eAot9JVuNvvFUDKJ/rouwkDv3KeCBky4//0eR66jrnY=; b=oOjbqia0Y1MK/qWad4HkeUjefQu4hf+hNEmn9hN2XkWjzwaxQMA2N/2Rw74mkfK8Vd CYzI5wBL6ZHy7VLOn5LmMZT9ctW/UpmxHEAHN9Fp5Mgj5Z5j6u7dck5d8kTjZPsC9IWM fSoUZFOpLjU1hkriSBFPPLkqjd4M9IjMLaKEFzxYUuLkTtP4hFWpiRMebWpfwAvXCCA2 +2SlQQdoTy8uNCOa0mBB6e2OfmyFaPYxDin6rg7vkyTis1UhcSJOxXkNM+Nl0zjXNUUK GCrSItkYzBKtb+WeMTjdH1P9xRQUnMwJkcJEygAbkGDz1ZkuoZfjVmyucGKp0xeBh+5Q V5kg== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eAot9JVuNvvFUDKJ/rouwkDv3KeCBky4//0eR66jrnY=; b=lMfKtwhgVCCuRYMJDE1gpkGjXZW5xg2v29yKdOoJAq7hiJ/gX5DKD4L44oKUTjLxjX UOl+RTH2losWosrMsnHMGNCbJshSHCUAwUPIgwhUEh+Fxrk8utjEr+J9Sy1AaWQKuhNV Mjrl42vtHQVL6SP8v1KxXrF60hx1+vkGHqx4KAZRSQcF7/fxTAcb/wVsTcASmkJ4l1UY yTrGPOJk5agiHXSrimbhBMIvXGA89DiTZyoID6ZeMBR3RMLqFJu4tZyD3mQzlsOP9bJz xDRSy7Do85OateU5YSHTkqN4Dyi9I+uOgA1eM1oWFxrL759plmarUuTx/9aLCTZKawz+ oiiA== X-Gm-Message-State: AOAM530ZxP55SIG8gzThr9rv09WARVKU/sAsdgljZV5fI+IDt4ATQQdY NSUcYoxQYYq1cUdZ+DgCHhMU1cnkmGI= X-Google-Smtp-Source: ABdhPJy50q4rS5Ix1j6N9K3OeNWjIUqvL5yJy1B3Q8we0oI40u7c8DxhiY+dWhDDS8JNXRErdhng8w== X-Received: by 2002:a05:600c:268a:b0:381:d9:f412 with SMTP id 10-20020a05600c268a00b0038100d9f412mr225374wmt.46.1645624055202; Wed, 23 Feb 2022 05:47:35 -0800 (PST) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id d6sm55823135wrs.85.2022.02.23.05.47.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:47:34 -0800 (PST) From: zimoun Date: Wed, 23 Feb 2022 14:47:05 +0100 Message-Id: <20220223134722.354636-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220223134722.354636-1-zimon.toutoune@gmail.com> References: <20220223134722.354636-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645624113; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eAot9JVuNvvFUDKJ/rouwkDv3KeCBky4//0eR66jrnY=; b=umRkJaoU8sZryuGFbQpJIpVOfhVH1QJiA0JCK9lxgNmoXYC3jIayLOMiWYz1c1Sw6GBLLt S3Dqm1zRGtm2fbQylFFWCYnmmmHaCBakEk4IvU6IBPSg0n3JusTHknsEbZKsx8ccH8OTA/ OEgX6jD9T3qqShJVJHxNPqq0HvfSIj1JWf4tBhZLUWe1S9Jfat3yTFuCEyP5+tAEpBszEz YAhW2LhZymiXKErCmlBJSJEF9QbN5ze12gIDyQgX27j/bnkdgIBkb8pZ58u2WGwQHhGEm0 mYLEipnYr9cnRDd4M15lwsatbxJ2dGbeGOW6IWAsklSvfYcjWQh/hHgKZlp5gw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645624113; a=rsa-sha256; cv=none; b=EdPEHLYXWQJveNKlT1MOgPB2WaEnc6iC44DDq3IdmLa4n5+KT3WfZPqDgBSNpBsPRpD5iv sco3uqdcBGxjbiBaT+sP7HpnKmW3sFn/nbKjGNYD4pYDXHjhw/pxpg9z7i1Mn9FDX/6aVA FjB+TMANopwUYoYSfls1LLLEtbVlbO7FqzzUzMfkPx/o8P/47F02UydBPANhnAh4xeffxD SNAMAGoGhkWqFH+2wjTgikSq2gHvyKEsj/+6FRkGM9PPfF4G02emGClxKP3d003MxKS3P/ qRKik6rbaJRz396LgiP7AFNNDQfGophkiM1xoQ/E2MSf9WvwZYf3jSP84FSTmg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=oOjbqia0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=oOjbqia0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 25E7613DCC X-Spam-Score: -2.03 X-Migadu-Scanner: scn1.migadu.com X-TUID: ImCmTwKAyw4b From: Efraim Flashner * guix/build-system/julia.scm (link-depot): Accept julia-package-dependencies keyword and use it for 'julia-create-package-toml' function. (julia-create-package-toml): Use pattern matching. (julia-build): Add 'julia-pacakge-dependencies'. * guix/build/julia-build-system.scm (julia-build): Add '#:julia-package-dependencies' keyword. --- guix/build-system/julia.scm | 7 +++++-- guix/build/julia-build-system.scm | 14 ++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm index 6261f8a55a..66e7711bcd 100644 --- a/guix/build-system/julia.scm +++ b/guix/build-system/julia.scm @@ -2,7 +2,8 @@ ;;; Copyright © 2019 Nicolò Balzarotti ;;; Copyright © 2021 Ludovic Courtès ;;; Copyright © 2021 Jean-Baptiste Volatier -;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021, 2022 Simon Tournier +;;; Copyright © 2022 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,6 +89,7 @@ (define* (julia-build name inputs (guile #f) (julia-package-name #f) (julia-package-uuid #f) + (julia-package-dependencies ''()) (imported-modules %julia-build-system-modules) (modules '((guix build julia-build-system) (guix build utils)))) @@ -108,7 +110,8 @@ (define builder search-paths)) #:inputs #$(input-tuples->gexp inputs) #:julia-package-name #$julia-package-name - #:julia-package-uuid #$julia-package-uuid)))) + #:julia-package-uuid #$julia-package-uuid + #:julia-package-dependencies #$julia-package-dependencies)))) (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) system #:graft? #f))) diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-system.scm index 03d669be64..c5ad65d029 100644 --- a/guix/build/julia-build-system.scm +++ b/guix/build/julia-build-system.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019, 2020 Nicolò Balzarotti ;;; Copyright © 2021 Jean-Baptiste Volatier ;;; Copyright © 2021, 2022 Simon Tournier +;;; Copyright © 2022 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -136,7 +137,8 @@ (define* (check #:key tests? source inputs outputs julia-package-name package "/test/runtests.jl")))))) (define* (link-depot #:key source inputs outputs - julia-package-name julia-package-uuid #:allow-other-keys) + julia-package-name julia-package-uuid + julia-package-dependencies #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (name+version (strip-store-file-name out)) (version (last (string-split name+version #\-))) @@ -156,6 +158,7 @@ (define* (link-depot #:key source inputs outputs (julia-create-package-toml (getcwd) julia-package-name julia-package-uuid version + julia-package-dependencies #:file "Project.toml")) ;; When installing a package, julia looks first at in the JULIA_DEPOT_PATH @@ -186,9 +189,10 @@ (define* (julia-create-package-toml location ") f) (when (not (null? deps)) (display "[deps]\n" f) - (for-each (lambda dep - (display (string-append (car (car dep)) " = \"" (cdr (car dep)) "\"\n") - f)) + (for-each (match-lambda + ((name . uuid) + (display (string-append name " = \"" uuid "\"\n") + f))) deps)) (close-port f))) @@ -207,6 +211,7 @@ (define %standard-phases (delete 'build))) (define* (julia-build #:key inputs julia-package-name julia-package-uuid + julia-package-dependencies (phases %standard-phases) #:allow-other-keys #:rest args) "Build the given Julia package, applying all of PHASES in order." @@ -214,4 +219,5 @@ (define* (julia-build #:key inputs julia-package-name julia-package-uuid #:inputs inputs #:phases phases #:julia-package-name julia-package-name #:julia-package-uuid julia-package-uuid + #:julia-package-dependencies julia-package-dependencies args)) -- 2.34.0