mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
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
This commit is contained in:
parent
e661121e39
commit
67b212ff60
1 changed files with 10 additions and 1 deletions
|
@ -73,7 +73,9 @@ (define-module (gnu packages rust)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 optargs)
|
#:use-module (ice-9 optargs)
|
||||||
#:use-module (srfi srfi-1)
|
#: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
|
;; This is the hash for the empty file, and the reason it's relevant is not
|
||||||
;; the most obvious.
|
;; the most obvious.
|
||||||
|
@ -1309,6 +1311,13 @@ (define*-public (make-rust-sysroot target)
|
||||||
|
|
||||||
(define make-rust-sysroot/implementation
|
(define make-rust-sysroot/implementation
|
||||||
(mlambda (target base-rust)
|
(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
|
(package
|
||||||
(inherit base-rust)
|
(inherit base-rust)
|
||||||
(name (string-append "rust-sysroot-for-" target))
|
(name (string-append "rust-sysroot-for-" target))
|
||||||
|
|
Loading…
Reference in a new issue