summaryrefslogtreecommitdiff
path: root/guix/scripts/build.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/build.scm')
-rw-r--r--guix/scripts/build.scm50
1 files changed, 31 insertions, 19 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 4a00505022..14b8f2d6bd 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -147,34 +147,46 @@ options handled by 'set-build-options-from-command-line', and listed in
(define %standard-build-options
;; List of standard command-line options for tools that build something.
(list (option '(#\K "keep-failed") #f #f
- (lambda (opt name arg result)
- (alist-cons 'keep-failed? #t result)))
+ (lambda (opt name arg result . rest)
+ (apply values
+ (alist-cons 'keep-failed? #t result)
+ rest)))
(option '("fallback") #f #f
- (lambda (opt name arg result)
- (alist-cons 'fallback? #t
- (alist-delete 'fallback? result))))
+ (lambda (opt name arg result . rest)
+ (apply values
+ (alist-cons 'fallback? #t
+ (alist-delete 'fallback? result))
+ rest)))
(option '("no-substitutes") #f #f
- (lambda (opt name arg result)
- (alist-cons 'substitutes? #f
- (alist-delete 'substitutes? result))))
+ (lambda (opt name arg result . rest)
+ (apply values
+ (alist-cons 'substitutes? #f
+ (alist-delete 'substitutes? result))
+ rest)))
(option '("no-build-hook") #f #f
- (lambda (opt name arg result)
- (alist-cons 'build-hook? #f
- (alist-delete 'build-hook? result))))
+ (lambda (opt name arg result . rest)
+ (apply values
+ (alist-cons 'build-hook? #f
+ (alist-delete 'build-hook? result))
+ rest)))
(option '("max-silent-time") #t #f
- (lambda (opt name arg result)
- (alist-cons 'max-silent-time (string->number* arg)
- result)))
+ (lambda (opt name arg result . rest)
+ (apply values
+ (alist-cons 'max-silent-time (string->number* arg)
+ result)
+ rest)))
(option '("verbosity") #t #f
- (lambda (opt name arg result)
+ (lambda (opt name arg result . rest)
(let ((level (string->number arg)))
- (alist-cons 'verbosity level
- (alist-delete 'verbosity result)))))
+ (apply values
+ (alist-cons 'verbosity level
+ (alist-delete 'verbosity result))
+ rest))))
(option '(#\c "cores") #t #f
- (lambda (opt name arg result)
+ (lambda (opt name arg result . rest)
(let ((c (false-if-exception (string->number arg))))
(if c
- (alist-cons 'cores c result)
+ (apply values (alist-cons 'cores c result) rest)
(leave (_ "~a: not a number~%") arg)))))))