From patchwork Mon Sep 18 18:03:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 54038 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 5B11427BBEA; Mon, 18 Sep 2023 19:08:42 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 00A8627BBE2 for ; Mon, 18 Sep 2023 19:08:39 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiIdZ-0005Qe-Na; Mon, 18 Sep 2023 14:06:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qiIdL-0005DF-1N for guix-patches@gnu.org; Mon, 18 Sep 2023 14:06:08 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiIdK-000461-Pi for guix-patches@gnu.org; Mon, 18 Sep 2023 14:06:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qiIdT-0002XD-0Y for guix-patches@gnu.org; Mon, 18 Sep 2023 14:06:15 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66092] [PATCH v2 11/23] DRAFT import: juliahub: Improve dependency management. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 18 Sep 2023 18:06:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66092 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62202@debbugs.gnu.org Cc: 66092@debbugs.gnu.org, zimon.toutoune@gmail.com X-Debbugs-Original-Cc: Nicolas Graves via Guix-patches via , Simon Tournier Received: via spool by submit@debbugs.gnu.org id=B.16950603659536 (code B ref -1); Mon, 18 Sep 2023 18:06:14 +0000 Received: (at submit) by debbugs.gnu.org; 18 Sep 2023 18:06:05 +0000 Received: from localhost ([127.0.0.1]:54492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiIdI-0002TY-Hz for submit@debbugs.gnu.org; Mon, 18 Sep 2023 14:06:05 -0400 Received: from lists.gnu.org ([2001:470:142::17]:34906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiIbm-0002LH-2N for submit@debbugs.gnu.org; Mon, 18 Sep 2023 14:04:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qiIbQ-0002Vw-Ln for guix-patches@gnu.org; Mon, 18 Sep 2023 14:04:10 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiIbA-0003PX-LM for guix-patches@gnu.org; Mon, 18 Sep 2023 14:04:08 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31ff6420f73so224684f8f.1 for ; Mon, 18 Sep 2023 11:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695060225; x=1695665025; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qM+SVoQB9toi6PC+m9jnwY9o5wFqpZW9jHiqrI8o5XA=; b=SYGEKYqyUmWmjuwnsfmaeF1ItlOLEzus7e7Xi9pvKtyM7L+BmhaAxORqFb7oDYwya2 yRfL7xr2lC7u3/nwvAxyxlv2sYq/J88RNeuAsjCAT3k+aAa1S02oNn2tNZ8UBgxGMNZZ mlvAislJ2o3CUrbsQrdLDWSgJgWbGPgSa1Ku7IKt28qF3Fv9aShh/ZKH3iN9r6UsvXmg B9SyFMsWpMd9dbAg5gA3veUxJjSvh14MnRMucRVuCHtJIhfPD/UWM5gmWMdbIu5Pretk 2LaHb7q4FrkpHljL/lfRysfWO6enzO1WV0LSQeZ2IT/1+hUHdNESXMu2U6EhYShJsLx+ SJDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695060225; x=1695665025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qM+SVoQB9toi6PC+m9jnwY9o5wFqpZW9jHiqrI8o5XA=; b=PirBen2ifXSlAJWQhWCyUXw/8Da8u+EgIsqFE47h7TL4ODplbPCGaWoUVUVDSeV9Gg GAaCpSYLt28VlOm547+OrwXvIvPXlxIXy5MPCxkuTcgG+ODv7Nqp9Xu+JqhXb0olnO3l s3iLm55Be6XGuqtrhrfm4Jk9OrislVEfIHN10tUl1G8HcqoMrA1BtuzfUFFR0p/QJDTf i6YHg8MTYavAUsplAGJpQNop81LvnA71L0A/6hyRNN3Mm4IMw+B0pEagggHev0B1yUZk CVxFhZaPe43Pb3B50gZcpb7yCeE/sCuxpgVvwSK7xtbNjfmewbWZsoJCY/Okh1YixczT nPcQ== X-Gm-Message-State: AOJu0Yw1i2+7hmvOMnwE36YuqBxSOwkKmmxOhJMqUdTAVKVw0V/p309X s4c8MxMd1RkGFRBk3RV9D0c= X-Google-Smtp-Source: AGHT+IH4OIOewHKT4Nf9ssrE49TpirRUfigR1o2uHDImUBPu1yKTaCvO8fipQM4ypDeGNb9Oioqy4A== X-Received: by 2002:a5d:484a:0:b0:31a:ea18:c516 with SMTP id n10-20020a5d484a000000b0031aea18c516mr8306778wrs.3.1695060224905; Mon, 18 Sep 2023 11:03:44 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 11:03:44 -0700 (PDT) From: Simon Tournier Date: Mon, 18 Sep 2023 20:03:18 +0200 Message-Id: <9c97220836376a2e6de87f52b4a7b842581225ed.1695060058.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x432.google.com 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, FREEMAIL_FROM=0.001, SPF_HELO_NONE=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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Nicolas Graves via Guix-patches via Signed-off-by: Simon Tournier --- guix/import/juliahub.scm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm index b1eeb736a824..fc25ba1d4220 100644 --- a/guix/import/juliahub.scm +++ b/guix/import/juliahub.scm @@ -168,22 +168,20 @@ (define* (juliahub-fetch name #:key (version #f)) json->juliahub-package)) (define (make-julia-sexp name source home-page synopsis description - dependencies test-dependencies-names licenses) + direct-dependencies test-dependencies-names licenses) "Return the `package' s-expression for a Julia package with the given NAME, -VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, +VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES, TEST-DEPENDENCIES-NAMES and LICENSES." `(package (name ,(julia-name->guix-name name)) (version ,version) (source ,source) (build-system julia-build-system) - ,@(let ((direct-dependencies - (filter julia-dependency-direct? dependencies))) - (if (null? direct-dependencies) - '() - `((propagated-inputs - (list ,@(map (compose julia-name->guix-name juliahub-dependency-name) - direct-dependencies)))))) + ,@(if (null? direct-dependencies) + '() + `((propagated-inputs + (list ,@(map (compose julia-name->guix-name juliahub-dependency-name) + direct-dependencies))))) ,@(if (null? test-dependencies-names) '() `((native-inputs @@ -211,9 +209,12 @@ (define* (juliahub->guix-package package-name `(tag-or-commit . ,(string-append "v" (juliahub-package-version package)))))) - (let* ((dependencies-names + (let* ((direct-dependencies + (filter juliahub-dependency-direct? + (juliahub-package-dependencies package))) + (dependencies-names (map juliahub-dependency-name - (juliahub-package-direct-dependencies package))) + direct-dependencies)) (licenses (map spdx-string->license (list (juliahub-package-license package)))) @@ -224,7 +225,7 @@ (define* (juliahub->guix-package package-name (juliahub-package-homepage package) (juliahub-package-description package) (beautify-description (juliahub-package-readme package)) - (juliahub-package-direct-dependencies package) + direct-dependencies test-dependencies-names licenses) (append dependencies-names test-dependencies-names))))