From patchwork Mon Sep 18 18:03:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 54025 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 D4FAB27BBE9; Mon, 18 Sep 2023 19:06:25 +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 B75A827BBE2 for ; Mon, 18 Sep 2023 19:06:23 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiIcT-0003bS-6h; Mon, 18 Sep 2023 14:05:13 -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 1qiIcC-0003Ac-3N for guix-patches@gnu.org; Mon, 18 Sep 2023 14:04:57 -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 1qiIcB-0003YJ-Rz for guix-patches@gnu.org; Mon, 18 Sep 2023 14:04:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qiIcK-0002Ne-4k for guix-patches@gnu.org; Mon, 18 Sep 2023 14:05:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62202] [PATCH v2 07/23] DRAFT import: juliahub: Add indirect dependencies. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 18 Sep 2023 18:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62202 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: 62202@debbugs.gnu.org Cc: zimon.toutoune@gmail.com X-Debbugs-Original-Cc: Nicolas Graves via Guix-patches via , Simon Tournier Received: via spool by 62202-submit@debbugs.gnu.org id=B62202.16950602528820 (code B ref 62202); Mon, 18 Sep 2023 18:05:04 +0000 Received: (at 62202) by debbugs.gnu.org; 18 Sep 2023 18:04:12 +0000 Received: from localhost ([127.0.0.1]:54375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiIbT-0002I7-B5 for submit@debbugs.gnu.org; Mon, 18 Sep 2023 14:04:11 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:38091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiIbE-0002Ef-UR for 62202@debbugs.gnu.org; Mon, 18 Sep 2023 14:04:00 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-31f7c87353eso946119f8f.0 for <62202@debbugs.gnu.org>; 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=1695060223; x=1695665023; darn=debbugs.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=skJOf1DBllhMdwi8a7KPjGXvCMcceEa6MzsLzGA6xQM=; b=mJVEEKoAxG8tpyfS37GPP2In9AFj4K77MuRxkDjhTAkQRRR/LNlCeM9nugTNdE9vn9 SDTBVFCwsZkZru91dSE6KTDO6Z/OXgrFj5Wtb2zHAySvDKvi1dJqL7DfNAOc1ahUtKkL C11PWSQqratNENbQIVE3N7XOhzdWWyd0rwojUOvHlF3IuNxX3R+miSWkmzkY5tVMUhWZ J2mMaQ7SWzTf1DPyxPVKi2yGb+Xd8PHYPUmS2pZpDsS6q+dKl37EtKlWhQUz6oqnB5+S gPtecIAGYaVs+jBZRLNge2WsP+8Xn8JvbaIlsg1G5za1AAvoo32MdoqoATbUzu7WDjvm slug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695060223; x=1695665023; 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=skJOf1DBllhMdwi8a7KPjGXvCMcceEa6MzsLzGA6xQM=; b=GXJSRSEw8fIratO5tZiD0TYJTPgqRNdjxPO2F5BxuAiO9WIMlhnQkZlnYneTyR9Ynu wavdeqyC93nhARfA9m+5mVtgROktLcSegWDlImWa8z/7UrDWFIRbCiQYKFcqNSNiH+lw 8Xavo8WsFxS9cqmtbG0n0S2/KIZmuqP0gKPmaG1poCZHXV/OKtd9XuxKMEYjpoG4r1Wt P1JEWSQs4c80kLd/DdBgBa8eSlkF0Njpu68SEU75AA8OpFKLt91DFRuxCJMR/6NJjgWD Gwa5WRaGFA+pZqCip4CW2I0NGYEIz9wn2WFtQeQleCgAZdKRJ3C4VqECpdCUL8jktehg Kz1A== X-Gm-Message-State: AOJu0YyjAviTRPT3Jcljq2HuSGLAFtMflY0KhT5qwZdnCY/D7c+uzksi H1dfA+W8clVSUSDMky0bEI2qv1Ks08E= X-Google-Smtp-Source: AGHT+IG38G6yAu8JWH8NqVqdmdowLZTl4+N/W5o3WEMSCbWHIPWG6wU0Id90/z4csPst1GtZzn1Bfg== X-Received: by 2002:a5d:43c3:0:b0:31f:84c9:d75f with SMTP id v3-20020a5d43c3000000b0031f84c9d75fmr7786907wrr.4.1695060222784; Mon, 18 Sep 2023 11:03:42 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 11:03:42 -0700 (PDT) From: Simon Tournier Date: Mon, 18 Sep 2023 20:03:14 +0200 Message-Id: <9582ebba5df585ec5c71e008e71aaefafc036753.1695060058.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 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 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm index 4c3ceed10904..fb361a004435 100644 --- a/guix/import/juliahub.scm +++ b/guix/import/juliahub.scm @@ -67,6 +67,16 @@ (define (json->juliahub-direct-dependencies vector) #f))) (vector->list vector)))) +(define (json->juliahub-indirect-dependencies vector) + (if (vector? vector) + (filter-map + (lambda (el) + (let ((dep (json->juliahub-dependency el))) + (if (not (juliahub-dependency-direct? dep)) + dep + #f))) + (vector->list vector)))) + (define (ini-list->extra-dependencies lst) (match lst (('(extras) ooo ...) @@ -103,6 +113,9 @@ (define-json-mapping make-juliahub-package juliahub-package? (direct-dependencies juliahub-package-direct-dependencies "deps" json->juliahub-direct-dependencies) ;list of + (indirect-dependencies + juliahub-package-indirect-dependencies "deps" + json->juliahub-indirect-dependencies) ;list of (url juliahub-package-url) ;string (uuid juliahub-package-uuid) ;string (license juliahub-package-license)) ;string @@ -181,7 +194,7 @@ (define* (juliahub->guix-package package-name (juliahub-package-direct-dependencies package) test-dependencies-names licenses) - (append dependencies-names test-dependencies)))) + (append dependencies-names test-dependencies-names)))) (values #f '())))) (define* (import-release package #:key (version #f))