summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-05-16 16:06:03 +0100
committerChristopher Baines <mail@cbaines.net>2024-07-15 22:34:22 +0100
commit4b85db10b1b45c6ef7b41b9c338eddf87e12b373 (patch)
treec6a316fdf454e647861cf86c9fc65725b1ebab9a /guix/ui.scm
parent0e5e3edec51911315b57144f32a8fe2856d57283 (diff)
guix: packages: Add new &package-unsupported-target-error.
Some packages don't support cross building to specific targets, so add a error type to signal this. * guix/packages.scm (&package-unsupported-target-error): New condition type. [package-unsupported-target-error? package-unsupported-target-error-target): New procedures. * guix/ui.scm (call-with-error-handling): Handle this new condition type. Change-Id: Ib47813399e04b20d616a95f545b6aabe25736e92
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index d82fa533cc..0bb1b3b3ba 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -756,6 +756,13 @@ evaluating the tests and bodies of CLAUSES."
(location->string loc)
(package-full-name package)
(build-system-name system))))
+ ((package-unsupported-target-error? c)
+ (let* ((package (package-error-package c))
+ (loc (package-location package)))
+ (leave (G_ "~a: ~a: does not support target `~a'~%")
+ (location->string loc)
+ (package-full-name package)
+ (package-unsupported-target-error-target c))))
((gexp-input-error? c)
(let ((input (gexp-error-invalid-input c)))
(leave (G_ "~s: invalid G-expression input~%")