From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YI8MBN09eGfdeAAAe85BDQ:P1 (envelope-from ) for ; Fri, 03 Jan 2025 19:43:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id YI8MBN09eGfdeAAAe85BDQ (envelope-from ) for ; Fri, 03 Jan 2025 20:43:25 +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=uAnQdR7+; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=uCHyV9Ol; 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=1735933404; 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-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=nC0iOnknBYxZ0b1L/RRW/c7/D93NEYxze212LxTlLzg=; b=ixEkjJS7elMEqd9FgGLmjx59++LRX2nIIkq13cHy08IDZTNMFQ3m+DeBAuAfD010htyC1h ha2+mnLVzYhZ/ZCF4WJ1Y3Dwvk6I2tvCjETiNZTGvmO8BjnfMfhPFpNDx1UJJvIHNTKclW wY0wIGfX3MlEEw/7Awo0GPpRyrN99HFbgGnrZDoKaHSMGou5Vt93W358gJCy1wVYJylj5J TmBWXsxImQR9XtaqwzvASWpZvEyqGw3ox4jWXqcdMYHEV6gRIP5dlBD/dvXWKHd0p42OT8 jnlMV2DPLt2270A7feE4UjhUHNTSkU5mxeKrqXWBi+kuMOGw1WZRdhQMrtX1/A== 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=uAnQdR7+; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=uCHyV9Ol; 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=1735933404; a=rsa-sha256; cv=none; b=fJ2eLLnCRLwM/HMgi5KThac2EB7bT2E63SbCw14USnKM5r5GxUtnIV8F+fa/gjUjnYjyn2 5N5iCWcfjUAEVDPN+sV8HExp85rJWBAAC+uRTdfnOJ0mE+FN3eXAID1Mxbuo/TN1pbPYrb fHTKtsaCIJTjvxRj2lyKVt0kpfpjmNzns02FUeGF6yiQm4VnFRieDRwtK0moJudH2nOV0b W6HnIINVqaTrHNRFkN50bbSFE8QMb5cvhUQVG5JKLANiobOKjoMiY3aDsdMO/48I8tOVB/ i1Vmub5DnclRrrR+vg4eJvhryMdE1g3wwyldxE6/uSDB+WvWuOIMD5RAtJgUfw== 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 2417B1D836 for ; Fri, 03 Jan 2025 20:43:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTnZX-0008T1-QO; Fri, 03 Jan 2025 14:43:03 -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 1tTnZW-0008Sg-Rz for guix-patches@gnu.org; Fri, 03 Jan 2025 14:43:02 -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-00009R-JL 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=nC0iOnknBYxZ0b1L/RRW/c7/D93NEYxze212LxTlLzg=; b=uAnQdR7+8BLkQ5avqehgefZIqd/pp+70YktLE0BSfJNFV+0UagyQlUVhW2IKX11xDS0slj2mOnugIKCwXk6Wid91cmqIq/GJnbBV8rILg5aFhVA4pqTWQsaJnTwGnzWNpUTZ3EzIzzbtSFUMoXwiYxHyu4Fyxkv316OJHkDvSn44qbm2wKYwp38jS4EnxIG0vmNylPwUqLw6Vseo1ZPaydkswm0gWX07mblHPR/4waQKMXYl3r/VcPxDyXqS742RxjvZ7pKSBK2GrDYcckrqjIBafMV2JAkndkucF7n6M6wVNvWX319fUUGeCXmqLSD20peG/y6uXu0EqECjlBgvZQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTnZW-0004i1-8H; Fri, 03 Jan 2025 14:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75325] [PATCH rust-team 1/2] build-system: cargo: Add add-dependencies procedure. 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.173593332217972 (code B ref 75325); Fri, 03 Jan 2025 19:43:02 +0000 Received: (at 75325) by debbugs.gnu.org; 3 Jan 2025 19:42:02 +0000 Received: from localhost ([127.0.0.1]:52211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTnYX-0004fW-55 for submit@debbugs.gnu.org; Fri, 03 Jan 2025 14:42:01 -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 1tTnYU-0004ex-BD for 75325@debbugs.gnu.org; Fri, 03 Jan 2025 14:41:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1735933305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nC0iOnknBYxZ0b1L/RRW/c7/D93NEYxze212LxTlLzg=; b=uCHyV9Ol6eA8YlWar2QfU6Gc5DIHcMOz0S3VPo4RrrUHj3MYnU40pqWSxY9ppyB3vvXJxN pPHGaDXX4ZqeHON+qkCm6Ra8yYeZTM2ruuAQtmL1nNbefb5KjyRGByp9CHeJ1/LwrgSX1h UyLKRcBqbHmtHQadkZBjuf/6dK3+FXEnE4VeM2rSQraYjtq1fLIWyrcwV+t0Wl2vWNU+5y gDN6uOzMQDfCI75ctqu14ZMU6dMN9L5Pv+0kI45BaFQqwVfbEn69P+YjSJ6Smm6VgVnkgx ZuLoybhLezrUf7lKadNV+92ejNxwBry6msPrbe11n1tQIXvJ9hzB+I0L3ql/qw== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 5fd80de5 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <75325@debbugs.gnu.org>; Fri, 3 Jan 2025 19:41:45 +0000 (UTC) Date: Fri, 3 Jan 2025 20:40:58 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: 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: , 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: mx12.migadu.com X-Migadu-Spam-Score: -2.00 X-Spam-Score: -2.00 X-Migadu-Queue-Id: 2417B1D836 X-TUID: vtLpUZooWxI9 * guix/build-system/cargo.scm (add-dependencies): Add procedure. Change-Id: I5385d136697bb6d41a5bd4f6120150f841369a04 --- guix/build-system/cargo.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 452f7f78d01..b22b9247a1c 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2019 Ivan Petkov ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021, 2024 Efraim Flashner -;;; Copyright © 2024 Herman Rimm +;;; Copyright © 2024-2025 Herman Rimm ;;; Copyright © 2024 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. @@ -38,7 +38,8 @@ (define-module (guix build-system cargo) #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) - #:export (%cargo-build-system-modules + #:export (add-dependencies + %cargo-build-system-modules %cargo-utils-modules cargo-build-system %crate-base-url @@ -46,6 +47,18 @@ (define-module (guix build-system cargo) crate-url? crate-uri)) +;; TODO: Move to (guix build cargo-utils). +(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 " +~:{[dev-dependencies.~a] +version = ~s +~@[features = [~{~s~^,~}]~]~%~}" + '#$dependencies) + (close port))) + (define %crate-base-url (make-parameter "https://crates.io")) (define crate-url -- 2.45.2