GNU bug report logs - #77093
[PATCH rust-team 00/18] New Rust packaging workflow based on lockfile importer.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Tue, 18 Mar 2025 07:18:02 UTC

Severity: normal

Tags: patch

Full log


Message #296 received at 77093 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 77093 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v4 rust-team 11/22] build/cargo: Set default value of
 arguments for build phases.
Date: Tue, 29 Apr 2025 00:23:08 +0800
This will make 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 for arguments specific to this build
system.

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 be96ab309f..d8433e1acd 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -77,7 +77,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)
@@ -141,7 +142,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."
@@ -260,7 +261,7 @@ (define* (patch-cargo-checksums #:key
 
 (define* (build #:key
                 parallel-build?
-                skip-build?
+                (skip-build? #f)
                 (features '())
                 (cargo-build-flags '("--release"))
                 #:allow-other-keys)
@@ -300,8 +301,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")
@@ -376,9 +377,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."
-- 
2.49.0





This bug report was last modified 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.