summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauermann@kolabnow.com>2022-08-21 03:11:24 -0300
committerMathieu Othacehe <othacehe@gnu.org>2022-08-30 08:55:16 +0200
commit65ce5fe2fb1783c5eae7b439f79627fdb5e9c578 (patch)
tree0e5072b6c525b55325d3168fc9d476403aa6df8b /guix/scripts
parent93ed34977eba26fbb74881bbb3d9af9b3118a663 (diff)
downloadguix-patches-65ce5fe2fb1783c5eae7b439f79627fdb5e9c578.tar
guix-patches-65ce5fe2fb1783c5eae7b439f79627fdb5e9c578.tar.gz
guix system: Use standard cross and native build options.
This change prevents guix system from erroring out with an ugly backtrace when it's passed an invalid value to the “--system” or “--target” option. It also adds the “--list-systems” and “--list-targets” options. The manual section about guix system doesn't mention the “--target” option, so add it there. * guix/scripts/system (show-help): Call show-cross-build-options-help and show-native-build-options-help. (%options): Remove own implementation of “system” and “target” options and use the ones in %standard-cross-build-options and %standard-native-build-options. * doc/guix.texi (Invoking guix system): Document “--target” option. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/system.scm16
1 files changed, 7 insertions, 9 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index be6e839941..443e9d3282 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1046,6 +1046,10 @@ Some ACTIONS support additional ARGS.\n"))
for 'describe' and 'list-generations', list installed
packages matching REGEXP"))
(newline)
+ (show-cross-build-options-help)
+ (newline)
+ (show-native-build-options-help)
+ (newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "
@@ -1136,14 +1140,6 @@ Some ACTIONS support additional ARGS.\n"))
(let ((level (string->number* arg)))
(alist-cons 'verbosity level
(alist-delete 'verbosity result)))))
- (option '(#\s "system") #t #f
- (lambda (opt name arg result)
- (alist-cons 'system arg
- (alist-delete 'system result eq?))))
- (option '("target") #t #f
- (lambda (opt name arg result)
- (alist-cons 'target arg
- (alist-delete 'target result eq?))))
(option '(#\r "root") #t #f
(lambda (opt name arg result)
(alist-cons 'gc-root arg result)))
@@ -1153,7 +1149,9 @@ Some ACTIONS support additional ARGS.\n"))
(option '(#\I "list-installed") #f #t
(lambda (opt name arg result)
(alist-cons 'list-installed (or arg "") result)))
- %standard-build-options))
+ (append %standard-build-options
+ %standard-cross-build-options
+ %standard-native-build-options)))
(define %default-options
;; Alist of default option values.