mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
packages: Raise an error condition a cross builder is needed but unavailable.
* guix/packages.scm (&package-cross-build-system-error): New condition type.
(package-cross-derivation): Raise &package-cross-build-system-error
when the build system doesn't support cross builds.
* guix/ui.scm (call-with-error-handling): Add
package-cross-build-system-error? case.
* tests/packages.scm ("package-cross-derivation, no cross builder"): New test.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#:use-module (gnu packages bootstrap)
|
||||
#:use-module (srfi srfi-11)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (srfi srfi-34)
|
||||
#:use-module (srfi srfi-64)
|
||||
#:use-module (rnrs io ports)
|
||||
#:use-module (ice-9 match))
|
||||
@@ -212,6 +213,16 @@
|
||||
(and (derivation-path? drv-path)
|
||||
(derivation? drv)))))
|
||||
|
||||
(test-assert "package-cross-derivation, no cross builder"
|
||||
(let* ((b (build-system (inherit trivial-build-system)
|
||||
(cross-build #f)))
|
||||
(p (package (inherit (dummy-package "p"))
|
||||
(build-system b))))
|
||||
(guard (c ((package-cross-build-system-error? c)
|
||||
(eq? (package-error-package c) p)))
|
||||
(package-cross-derivation %store p "mips64el-linux-gnu")
|
||||
#f)))
|
||||
|
||||
(unless (false-if-exception (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV))
|
||||
(test-skip 1))
|
||||
(test-assert "GNU Make, bootstrap"
|
||||
|
||||
Reference in New Issue
Block a user