[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/11: gnu: rust: Guard against unsupported rust targets.
From: |
guix-commits |
Subject: |
05/11: gnu: rust: Guard against unsupported rust targets. |
Date: |
Mon, 15 Jul 2024 17:35:35 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit 67b212ff6038ec8827e224603c85db55481fb3e6
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Jul 5 14:45:13 2024 +0200
gnu: rust: Guard against unsupported rust targets.
As cross-libc may return #f in this case, and the config.toml file
construction will also fail if the platform rust-target is #f..
* gnu/packages/rust.scm (make-rust-sysroot/implementation): Guard against
unsupported rust targets.
Change-Id: Ia0d5c889c6f5cd3478ad985c79feb9ba1c472c29
---
gnu/packages/rust.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index a385344473..8119f4560a 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -73,7 +73,9 @@
#:use-module (ice-9 match)
#:use-module (ice-9 optargs)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26))
+ #:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35))
;; This is the hash for the empty file, and the reason it's relevant is not
;; the most obvious.
@@ -1309,6 +1311,13 @@ exec -a \"$0\" \"~a\" \"$@\""
(define make-rust-sysroot/implementation
(mlambda (target base-rust)
+ (unless (platform-rust-target (lookup-platform-by-target target))
+ (raise
+ (condition
+ (&package-unsupported-target-error
+ (package base-rust)
+ (target target)))))
+
(package
(inherit base-rust)
(name (string-append "rust-sysroot-for-" target))
- branch master updated (0e5e3edec5 -> bf6ab0e0f5), guix-commits, 2024/07/15
- 01/11: guix: packages: Add new &package-unsupported-target-error., guix-commits, 2024/07/15
- 09/11: gnu: make-mingw-w64: Update to 12.0.0., guix-commits, 2024/07/15
- 11/11: gnu: mingw-w64-tools: Update to 12.0.0., guix-commits, 2024/07/15
- 03/11: guix: packages: Add &unsupported-cross-compilation-target-error., guix-commits, 2024/07/15
- 02/11: gnu: tls: Raise conditions from target->openssl-target., guix-commits, 2024/07/15
- 04/11: build-system: meson: Use a more specific exception., guix-commits, 2024/07/15
- 05/11: gnu: rust: Guard against unsupported rust targets.,
guix-commits <=
- 08/11: gnu: make-mingw-w64: Use G-Expressions., guix-commits, 2024/07/15
- 06/11: build-system: go: Properly handle when a target is unsupported., guix-commits, 2024/07/15
- 10/11: gnu: mingw-w64-tools: Use G-Expressions., guix-commits, 2024/07/15
- 07/11: gnu: make-mingw-w64: Memoize., guix-commits, 2024/07/15