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 ms9.migadu.com with LMTPS id qFbVA6a/EWRzuQAASxT56A (envelope-from ) for ; Wed, 15 Mar 2023 13:52:54 +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 qLXaA6a/EWRz3QAA9RJhRA (envelope-from ) for ; Wed, 15 Mar 2023 13:52:54 +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 70CE1393DD for ; Wed, 15 Mar 2023 13:52:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcQby-0003RK-Re; Wed, 15 Mar 2023 08:52:10 -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 1pcQbv-0003QC-Ha for guix-patches@gnu.org; Wed, 15 Mar 2023 08:52:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pcQbv-00039M-4T for guix-patches@gnu.org; Wed, 15 Mar 2023 08:52:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pcQbv-0001Zi-0G for guix-patches@gnu.org; Wed, 15 Mar 2023 08:52:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62202] [PATCH 11/21] import: juliahub: Improve test dependencies parsing. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Mar 2023 12:52:06 +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 To: 62202@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 62202-submit@debbugs.gnu.org id=B62202.16788847235966 (code B ref 62202); Wed, 15 Mar 2023 12:52:06 +0000 Received: (at 62202) by debbugs.gnu.org; 15 Mar 2023 12:52:03 +0000 Received: from localhost ([127.0.0.1]:39319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcQbq-0001Y4-HQ for submit@debbugs.gnu.org; Wed, 15 Mar 2023 08:52:02 -0400 Received: from 3.mo576.mail-out.ovh.net ([188.165.52.203]:44545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcQbj-0001X2-Ax for 62202@debbugs.gnu.org; Wed, 15 Mar 2023 08:51:56 -0400 Received: from director6.ghost.mail-out.ovh.net (unknown [10.109.156.164]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id 531A6265E1 for <62202@debbugs.gnu.org>; Wed, 15 Mar 2023 12:51:54 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-mfzm4 (unknown [10.110.115.9]) by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 1D5C71FE33; Wed, 15 Mar 2023 12:51:54 +0000 (UTC) Received: from ngraves.fr ([37.59.142.97]) by ghost-submission-6684bf9d7b-mfzm4 with ESMTPSA id eAi8BWq/EWQwlwAAhlYjSA (envelope-from ); Wed, 15 Mar 2023 12:51:54 +0000 X-OVh-ClientIp: 81.67.140.142 Date: Wed, 15 Mar 2023 13:51:20 +0100 Message-Id: <20230315125130.23041-11-ngraves@ngraves.fr> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315125130.23041-1-ngraves@ngraves.fr> References: <20230315125130.23041-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 13792836809647973090 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvkedggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrdeljeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepiedvvddtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejiedpmhhouggvpehsmhhtphhouhht 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678884772; a=rsa-sha256; cv=none; b=pWEI2akXs1NqKaZ7i18UhLKf6lqk4YhUoCohXFLzNevIBvTb/O/QzkpXzimtaoWu7+J4Ej /s9omMsk9JzTpisSVlLwy9oWPrZOo7QjC+Jj6m+5b7xAx384jpbFDaVfEbY3GRm+QmQjKP rObMdyBN0PgvDvp8gwH81sGZCMhk7kt9HmdIIV7bjodSyyDgnS85AB4qZtJLzq53Daw1Pp pf2N8wFaI00zPxHWKJKrcHDbFtN6WROSmEBq820q+5r5/qxAfGr7Z0kahmbn7i6wZ9zS3v Gd6mtv3fD7Zf0BbK0g7C103i3IRbtMUDyLPImHynkU9AGE74K8z/QjBGXelpDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678884772; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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; bh=hCf/oXY3I+9qvm2Ao6IMzSXzh9NYilhFKNdqlIwUv/c=; b=RFIoL9CV2QKuQwDrw2S8AjdY4sb+bIF8SIxZLN1bSBGJAfVpRQLviJ+r1JOyhx1+cep6dY 23ht2lLsiHo7/wr84Cc7uRPSWQr0ssYmGZlIqldSghQYbtF8SQCWSWk+Gkt/zPK/Yy2Djm ZHylP7/kElGOFLZf1RQYxBkjI0alZHktEdJH/J0cC4umvqbudtC1Sgb30nTBZ/zioikTP6 feXsnm1e8Mm/16fFGTQdRE2jH9o6OYmOx5UVazNlNj8yh2AyV+t4LIAmPh0XCnPoIKXIuK TCdQYSGkJD0ujuTMf/eOCVNAlDPG1s/uY7AOmabkxRJxwXcF9cT45Fgl/OZNSQ== X-Migadu-Spam-Score: -1.73 X-Spam-Score: -1.73 X-Migadu-Queue-Id: 70CE1393DD X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: ivC3psDR0kEq --- guix/import/juliahub.scm | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm index 5327e92325..2ea461b72a 100644 --- a/guix/import/juliahub.scm +++ b/guix/import/juliahub.scm @@ -154,31 +154,27 @@ (define (json->juliahub-dependencies vector) #f))) (vector->list vector)))) -(define (ini-list->extra-dependencies lst) +(define (ini-list->test-dependencies lst) (match lst - (('(extras) ooo ...) - (extra-list->extra-dependencies ooo)) - (((tag) ooo ...) - (ini-list->extra-dependencies ooo)) - ((attribute '= value ooo ...) - (ini-list->extra-dependencies ooo)) + (('test '= ooo ...) + `(,(caar ooo) ,@(test-list->test-dependencies (cdar ooo)))) + ((value ooo ...) + (ini-list->test-dependencies ooo)) ('() - '()))) + '()))) -(define (extra-list->extra-dependencies lst) +(define (test-list->test-dependencies lst) (match lst - ((attribute '= value ooo ...) - `(,(symbol->string attribute) ,@(extra-list->extra-dependencies ooo))) - (((tag) ooo ...) - '()) + ((('unquote value) ooo ...) + `(,value ,@(test-list->test-dependencies ooo))) ('() - '()))) + '()))) -(define (parse-extra-dependencies directory) +(define (parse-test-dependencies directory) (let* ((port (open-input-file (string-append directory "/Project.toml"))) (ini-list (stream->list (port->stream port read)))) (close-port port) - (ini-list->extra-dependencies ini-list))) + (ini-list->test-dependencies ini-list))) ;; Julia package. (define-json-mapping make-juliahub-package juliahub-package? @@ -268,7 +264,7 @@ (define* (juliahub->guix-package package-name (licenses (map spdx-string->license (list (juliahub-package-license package)))) - (test-dependencies-names (parse-extra-dependencies directory))) + (test-dependencies-names (parse-test-dependencies directory))) (values (make-julia-sexp package-name source -- 2.39.2