From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0A8nHNk9eGeSTgAA62LTzQ:P1 (envelope-from ) for ; Fri, 03 Jan 2025 19:43:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0A8nHNk9eGeSTgAA62LTzQ (envelope-from ) for ; Fri, 03 Jan 2025 20:43:21 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=vNi7sqSs; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="oxIv/mn8"; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735933401; 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:dkim-signature; bh=ry15AhjqfgWgo+1TFP333BkDCwuqNUZ/HknXo1r8dgE=; b=pWOTWmOJ+5RdnAVSbRXDTfg+X/27hWvWYL5opf1xKprgMQczmjmah7nyIuTpkCa7AhVzDZ 4MLd0SqigvXpuaN/zASRDitepjzKu62e08UXgcmq3OFUhpgTTrVS8xSexi+HxPyrXZgw2k puLixOjfUVZMjRi01i+MrS624ImxAkdXpVU5wyOEjOLE6PuMgxqMLNCEcCRcG210sqCME3 D5K1Q7ZIOSmp8SwKIJE/JVxot+8LlWmSpYNoQ8NFUZgXiIufdPvl+MAFyuGmChGAn9l4QH gs9sPYdIX4L/tKsDOIDhxda/fdS+mEjxJSFBvdIyEQ00XHIkubkYWvIib6muQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=vNi7sqSs; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="oxIv/mn8"; 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=1735933401; a=rsa-sha256; cv=none; b=ElJQr0pJGvMC283QPwqoLTCH1ifHDxH2uc0LVQrbM1cy40edV7CcUvvyDrJhKVZJ0c6auG sqArnHX8qMvktA8vvpxLhcmX2oI6PWpmlcEssglHlLbD5RnC+iiqSQsKWGbwZ1MMiNbtWl 7cOPqQ+IzA2EPqdnmcyyqCG1RqDvIUQn9vcfiDskUgWhHfuh3u7Tmpb6d/MWHRcnvqZyWJ Cru1h8LHOphEa9aaF8H+WMxy8lg53Hu4a120kk7JJ/VPosq96FmFrNTpEwrYpIYrIei7l/ D48q4wMh6FlyBXWabMg6/DHqXGb8AwqoUZgbKxs8RHZlXaKar5kgoZ5ENgvCnA== 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 36C897C8FD for ; Fri, 03 Jan 2025 20:43:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTnZY-0008T2-0j; Fri, 03 Jan 2025 14:43:04 -0500 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 1tTnZX-0008Ss-5r for guix-patches@gnu.org; Fri, 03 Jan 2025 14:43:03 -0500 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 1tTnZW-00009a-Tn for guix-patches@gnu.org; Fri, 03 Jan 2025 14:43:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=ry15AhjqfgWgo+1TFP333BkDCwuqNUZ/HknXo1r8dgE=; b=vNi7sqSsn0HK+4aFcDw4oQeoxGhIKjluwlg/ud8D6kvFoFXHEqKPaMoivFpJX+zA/e2OuvRXurv3Cjqx/5Jw8uYNEHzZZrOzujt9fvL8QxqAugsg/+euA+NVqz1AZinZvuZqy1G6VXBNyoP+aHjNus1wm0M3UnRKciZK/whPGLe1A54VfJKOBTk7SHkF/YQzz/u0tsOKQ7snT+2m0c+6Z/WFLv3qJncdWmNwVG6EwLPXdQZ8ORqbFufFfSLSISouMEMYBQu/kyVA6TxmB/F/yjhApeNdPRCVcOKWBlCtVlTwxIxIUz1AmGztzM2NYRsm2roLccPuaPnxql9+BXD1/Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTnZW-0004iB-Om; Fri, 03 Jan 2025 14:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75325] [PATCH rust-team 2/2] build-system: cargo: add-dependencies: Silence warning. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Fri, 03 Jan 2025 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75325 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75325@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by 75325-submit@debbugs.gnu.org id=B75325.173593332517992 (code B ref 75325); Fri, 03 Jan 2025 19:43:02 +0000 Received: (at 75325) by debbugs.gnu.org; 3 Jan 2025 19:42:05 +0000 Received: from localhost ([127.0.0.1]:52213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTnYb-0004g7-0I for submit@debbugs.gnu.org; Fri, 03 Jan 2025 14:42:05 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:39713 helo=email.rimm.ee) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTnYW-0004ex-0P for 75325@debbugs.gnu.org; Fri, 03 Jan 2025 14:42:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1735933306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ry15AhjqfgWgo+1TFP333BkDCwuqNUZ/HknXo1r8dgE=; b=oxIv/mn8GyqaIaP+h1c11es2Ugcb5NyM7CFXvgMC1L66LhYIqIEjBD+OpkRGSLpGdjZrRW GKCagpywP7GTAwFWQVTs7CSWXAIxvmJXhi3L3V79xbwf/4Yza3DPihR4g8vA2phYDu8hKu Hk3HT1StMs7DFyp2GlD2HVoc5DYofg88A/pOfgNvMWrh5mrgetC4RpttcgEvsnxhLuInW0 X27IBTTejMJtrxxd4gcJ4OOMUuSoCZsKKivDIrkwpjoqhxy2nDbGce05IP3cwPqTHfZJDs Tx73yww57fgBqlMqMNiJvNYbVO1WkS5wIjvnBQDo4CQck3DXNnfcnPesI8zI/Q== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 36c37786 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <75325@debbugs.gnu.org>; Fri, 3 Jan 2025 19:41:46 +0000 (UTC) Date: Fri, 3 Jan 2025 20:40:59 +0100 Message-ID: <2929f9484a26fba24961dfd7fecd4180a7964775.1735932581.git.herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -1.70 X-Spam-Score: -1.70 X-Migadu-Queue-Id: 36C897C8FD X-TUID: wIQg18sVA7xc * guix/build-system/cargo.scm (add-dependencies): Silence warning. Change-Id: I8691766fc19073719e75c05eb5bfbce45ffc9b80 --- guix/build-system/cargo.scm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index b22b9247a1c..877ebaec135 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -34,6 +34,7 @@ (define-module (guix build-system cargo) #:use-module (guix platform) #:use-module (guix build-system) #:use-module (guix build-system gnu) + #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) @@ -51,13 +52,20 @@ (define-module (guix build-system cargo) (define* (add-dependencies dependencies) "DEPENDENCIES is a list of (crate version features). It is formatted and appendended to Cargo.toml." - #~(let ((port (open-file "Cargo.toml" "a"))) - (format port " + (let ((dependencies + (map (match-lambda + ((crate version ()) (list crate version #f)) + ((crate version (? pair? features)) + (list crate version (format #f "~{~s~^,~}" features))) + (dep dep)) + dependencies))) + #~(let ((port (open-file "Cargo.toml" "a"))) + (format port " ~:{[dev-dependencies.~a] version = ~s -~@[features = [~{~s~^,~}]~]~%~}" - '#$dependencies) - (close port))) +~@[features = [~a]~]~%~}" + '#$dependencies) + (close port)))) (define %crate-base-url (make-parameter "https://crates.io")) -- 2.45.2