diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-05-20 18:14:55 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-05-20 18:29:26 +0200 |
commit | 969e678ed9f907764e6412386432dfbddf493f71 (patch) | |
tree | 1e03fb0df41eb9d278dd4d75cc57fdf34c79327e /guix/scripts/package.scm | |
parent | d8482ad0d613758b85fdff90c5d6d6d2785564bf (diff) | |
download | guix-patches-969e678ed9f907764e6412386432dfbddf493f71.tar guix-patches-969e678ed9f907764e6412386432dfbddf493f71.tar.gz |
Add `--max-silent-time' to `guix build' and `guix package'.
* guix/scripts/build.scm (%default-options): Add default
`max-silent-time' value.
(show-help, %options): Add `--max-silent-time'.
(guix-build): Pass `max-silent-time' to `set-build-options'.
* guix/scripts/package.scm (%default-options): Add default
`max-silent-time' value.
(show-help, %options): Add `--max-silent-time'.
(guix-package): Pass `max-silent-time' to `set-build-options'.
* guix/ui.scm (string->number*): New procedure.
* tests/derivations.scm ("build-expression->derivation and
max-silent-time"): New test.
* doc/guix.texi (Invoking guix package, Invoking guix build): Document
`--max-silent-time'.
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r-- | guix/scripts/package.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 7fda71e7e9..e68d0dd902 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -413,6 +413,7 @@ PACKAGES, in the context of PROFILE." (define %default-options ;; Alist of default option values. `((profile . ,%current-profile) + (max-silent-time . 3600) (substitutes? . #t))) (define (show-help) @@ -439,6 +440,9 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n")) (display (_ " --no-substitutes build instead of resorting to pre-built substitutes")) (display (_ " + --max-silent-time=SECONDS + mark the build as failed after SECONDS of silence")) + (display (_ " --bootstrap use the bootstrap Guile to build the profile")) (display (_ " --verbose produce verbose output")) @@ -499,6 +503,10 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n")) (lambda (opt name arg result) (alist-cons 'substitutes? #f (alist-delete 'substitutes? result)))) + (option '("max-silent-time") #t #f + (lambda (opt name arg result) + (alist-cons 'max-silent-time (string->number* arg) + result))) (option '("bootstrap") #f #f (lambda (opt name arg result) (alist-cons 'bootstrap? #t result))) @@ -902,7 +910,9 @@ more information.~%")) (parameterize ((%store (open-connection))) (set-build-options (%store) #:use-substitutes? - (assoc-ref opts 'substitutes?)) + (assoc-ref opts 'substitutes?) + #:max-silent-time + (assoc-ref opts 'max-silent-time)) (parameterize ((%guile-for-build (package-derivation (%store) |