diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-10-18 22:24:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-10-18 22:32:21 +0200 |
commit | 1c3972daa823ae6f669f6668b236250eec6aa324 (patch) | |
tree | f824eede7cbb55aa0592c26e2642e3c3eceaa2ed /guix-build.in | |
parent | e3dadc6818db307abe581fb73daa5dafb3219393 (diff) | |
download | guix-1c3972daa823ae6f669f6668b236250eec6aa324.tar.gz |
guix-build: Add `--local-build'.
* guix-build.in (show-help): Add `--local-build'. (%options): Likewise. (guix-build): Pass `set-build-options' the #:use-substitutes? argument accordingly.
Diffstat (limited to 'guix-build.in')
-rw-r--r-- | guix-build.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/guix-build.in b/guix-build.in index 058e13109a..e1607503a9 100644 --- a/guix-build.in +++ b/guix-build.in @@ -90,6 +90,8 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n")) (display (_ " -n, --dry-run do not build the derivations")) (display (_ " + --local-build build locally instead of resorting to substitutes")) + (display (_ " -c, --cores=N allow the use of up to N CPU cores for the build")) (newline) (display (_ " @@ -131,9 +133,12 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@")) (if c (alist-cons 'cores c result) (leave (_ "~a: not a number~%") arg))))) - (option '(#\n "dry-run") #f #F + (option '(#\n "dry-run") #f #f + (lambda (opt name arg result) + (alist-cons 'dry-run? #t result))) + (option '("local-build") #f #f (lambda (opt name arg result) - (alist-cons 'dry-run? #t result))))) + (alist-cons 'local-build? #t result))))) ;;; @@ -198,7 +203,8 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@")) ;; TODO: Add more options. (set-build-options %store #:keep-failed? (assoc-ref opts 'keep-failed?) - #:build-cores (or (assoc-ref opts 'cores) 0)) + #:build-cores (or (assoc-ref opts 'cores) 0) + #:use-substitutes? (not (assoc-ref opts 'local-build?))) (if (assoc-ref opts 'derivations-only?) (format #t "~{~a~%~}" drv) |