aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/packages.scm12
-rw-r--r--guix/ui.scm9
2 files changed, 20 insertions, 1 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 9d11b468fb..4f8d87e53a 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -83,7 +83,9 @@
package-error-package
&package-input-error
package-input-error?
- package-error-invalid-input))
+ package-error-invalid-input
+ &package-cross-build-system-error
+ package-cross-build-system-error?))
;;; Commentary:
;;;
@@ -234,6 +236,9 @@ corresponds to the arguments expected by `set-path-environment-variable'."
package-input-error?
(input package-error-invalid-input))
+(define-condition-type &package-cross-build-system-error &package-error
+ package-cross-build-system-error?)
+
(define (package-full-name package)
"Return the full name of PACKAGE--i.e., `NAME-VERSION'."
@@ -412,6 +417,11 @@ system identifying string)."
(= build-system-cross-builder builder)
args inputs propagated-inputs native-inputs self-native-input?
outputs)
+ (unless builder
+ (raise (condition
+ (&package-cross-build-system-error
+ (package package)))))
+
(let* ((inputs (package-transitive-target-inputs package))
(input-drvs (map (cut expand-input
store package <>
diff --git a/guix/ui.scm b/guix/ui.scm
index cf94aa0818..cd47989ca6 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -23,6 +23,7 @@
#:use-module (guix store)
#:use-module (guix config)
#:use-module (guix packages)
+ #:use-module (guix build-system)
#:use-module (guix derivations)
#:use-module ((guix licenses) #:select (license? license-name))
#:use-module (srfi srfi-1)
@@ -152,6 +153,14 @@ General help using GNU software: <http://www.gnu.org/gethelp/>"))
(leave (_ "~a:~a:~a: package `~a' has an invalid input: ~s~%")
file line column
(package-full-name package) input)))
+ ((package-cross-build-system-error? c)
+ (let* ((package (package-error-package c))
+ (loc (package-location package))
+ (system (package-build-system package)))
+ (leave (_ "~a: ~a: build system `~a' does not support cross builds~%")
+ (location->string loc)
+ (package-full-name package)
+ (build-system-name system))))
((nix-connection-error? c)
(leave (_ "failed to connect to `~a': ~a~%")
(nix-connection-error-file c)