From patchwork Tue Mar 18 07:24:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 40311 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 177FC27BBEA; Tue, 18 Mar 2025 07:27:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham 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 C4A2727BBE2 for ; Tue, 18 Mar 2025 07:27:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuRLv-0007X4-Ln; Tue, 18 Mar 2025 03:27:07 -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 1tuRLt-0007WO-JR for guix-patches@gnu.org; Tue, 18 Mar 2025 03:27:05 -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 1tuRLt-0000uf-4q for guix-patches@gnu.org; Tue, 18 Mar 2025 03:27:05 -0400 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=HtYEExicQh5Fb/O/ity8W3bnp/kwCs5U25QBUcMnorE=; b=UVdUG6KuI/qPMYgx+1yHHIwuSa54E8TUYXYLVLf1YMm8dHsKZjaD270BerNxnJ5IcdJMXi3Lpi05RQcNG8YpmbwE5N6AinueXSx6zX1V4AEkv3PQskTjBlYsCY4FdNdnoEVMbdWZkqHaVJeTRGTF3FhnyVu+ZVTQdFPtmeGbnBNjRlkjCbSJzuAMiVJ5o1n3qiZhg034JIOcF5qC/W8JmWgJGGd6P6x8+WAOT3GL6bBCd1PaZwFi0/8510s7U4AXjhohzqvN2mw6yltUFcrRhfCNesND5B6fEKc5O+/VfNvfeyG89T9Xse5EmkkKhcD9mZPNpFayfJh2ovH+gNE/UQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tuRLs-0004o0-R7; Tue, 18 Mar 2025 03:27:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77093] [PATCH rust-team 05/18] build/cargo: Set default value of arguments for build phases. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: hako@ultrarare.space, divya@subvertising.org, efraim@flashner.co.il, steve@futurile.net, guix-patches@gnu.org Resent-Date: Tue, 18 Mar 2025 07:27:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77093 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77093@debbugs.gnu.org Cc: Hilton Chain , Hilton Chain , Divya Ranjan Pattanaik , Efraim Flashner , Steve George X-Debbugs-Original-Xcc: Hilton Chain , Divya Ranjan Pattanaik , Efraim Flashner , Steve George Received: via spool by 77093-submit@debbugs.gnu.org id=B77093.174228277817989 (code B ref 77093); Tue, 18 Mar 2025 07:27:04 +0000 Received: (at 77093) by debbugs.gnu.org; 18 Mar 2025 07:26:18 +0000 Received: from localhost ([127.0.0.1]:35909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tuRL7-0004fz-Vj for submit@debbugs.gnu.org; Tue, 18 Mar 2025 03:26:18 -0400 Received: from mx.boiledscript.com ([88.99.243.112]:33306) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tuRKe-0004b6-W7 for 77093@debbugs.gnu.org; Tue, 18 Mar 2025 03:25:50 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1742282747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HtYEExicQh5Fb/O/ity8W3bnp/kwCs5U25QBUcMnorE=; b=VeLmxoWcqHj+rngBLQmpPQSfT/TUN9gW3+nuvCr7iCeHAxwce9Spf5qTthJ+QIE4n+u7BW 4Ey8JLNKBujpO8r5uRA8OHDny6MV1Q48/dAV5sFREum1qo2358ZJHlJ31zEVh7uSt00SRT yJsTGAXEIVz6KZNotczUWWi2k8IFY9zQ5mzfxJ2pzBQceCRhH9Fh1Z0mLdJXd3cSu7mNh6 9WV0+/1GRrSfpDn7YMneqYNTY8+nSvvyIg6ouVk/ef5O2ZI6eMHZ4BH6GwHN/lyRqXDzqg JcKtkXsqkwVmsnv+vXEEGylRsNPqZT7WJ8X2WPlLXLUB6pJlkUPKi1TMpfB5bw== Date: Tue, 18 Mar 2025 15:24:18 +0800 Message-ID: <58d019ff3c92473fc9813ddcbdf6aaee536c60b7.1742281797.git.hako@ultrarare.space> 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 This makes it easier to use these phases in other bulid systems. * guix/build/cargo-build-system.scm (unpack-rust-crates,configure,build,package) (install): Set default value of arguments. Change-Id: I1dde1b063d8eee57967903abd2fce94574211a0a --- guix/build/cargo-build-system.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index bcee10837e..fdc9ae89c8 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -76,7 +76,8 @@ (define (crate-src? path) " | cut -d/ -f2" " | grep -q '^Cargo.toml$'"))))) -(define* (unpack-rust-crates #:key inputs vendor-dir #:allow-other-keys) +(define* (unpack-rust-crates #:key inputs (vendor-dir "guix-vendor") + #:allow-other-keys) (define (inputs->rust-inputs inputs) "Filter using the label part from INPUTS." (filter (lambda (input) @@ -139,7 +140,7 @@ (define* (check-for-pregenerated-files #:key parallel-build? #:allow-other-keys) (define* (configure #:key inputs target system - cargo-target + (cargo-target #f) (vendor-dir "guix-vendor") #:allow-other-keys) "Vendor Cargo.toml dependencies as guix inputs." @@ -258,7 +259,7 @@ (define* (patch-cargo-checksums #:key (define* (build #:key parallel-build? - skip-build? + (skip-build? #f) (features '()) (cargo-build-flags '("--release")) #:allow-other-keys) @@ -298,8 +299,8 @@ (define* (check #:key (define* (package #:key source - skip-build? - install-source? + (skip-build? #f) + (install-source? #t) (cargo-package-crates '()) (cargo-package-flags '("--no-metadata" "--no-verify")) (vendor-dir "guix-vendor") @@ -381,9 +382,9 @@ (define* (package #:key (define* (install #:key inputs outputs - skip-build? - install-source? - features + (skip-build? #f) + (install-source? #t) + (features '()) (cargo-install-paths '()) #:allow-other-keys) "Install a given Cargo package."