mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
guix-build: Add `--derivations'.
* guix-build.in (show-help): Add `--derivations'. (%options): Likewise. (guix-build): Handle it.
This commit is contained in:
parent
5dba31494e
commit
609354bf0a
1 changed files with 19 additions and 12 deletions
|
@ -84,6 +84,8 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
|
||||||
(display (_ "
|
(display (_ "
|
||||||
-S, --source build the packages' source derivations"))
|
-S, --source build the packages' source derivations"))
|
||||||
(display (_ "
|
(display (_ "
|
||||||
|
-d, --derivations return the derivation paths of the given packages"))
|
||||||
|
(display (_ "
|
||||||
-K, --keep-failed keep build tree of failed builds"))
|
-K, --keep-failed keep build tree of failed builds"))
|
||||||
(display (_ "
|
(display (_ "
|
||||||
-n, --dry-run do not build the derivations"))
|
-n, --dry-run do not build the derivations"))
|
||||||
|
@ -112,6 +114,9 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
|
||||||
(option '(#\S "source") #f #f
|
(option '(#\S "source") #f #f
|
||||||
(lambda (opt name arg result)
|
(lambda (opt name arg result)
|
||||||
(alist-cons 'source? #t result)))
|
(alist-cons 'source? #t result)))
|
||||||
|
(option '(#\d "derivations") #f #f
|
||||||
|
(lambda (opt name arg result)
|
||||||
|
(alist-cons 'derivations-only? #t result)))
|
||||||
(option '(#\e "expression") #t #f
|
(option '(#\e "expression") #t #f
|
||||||
(lambda (opt name arg result)
|
(lambda (opt name arg result)
|
||||||
(alist-cons 'expression
|
(alist-cons 'expression
|
||||||
|
@ -196,6 +201,8 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
|
||||||
#:build-cores (or (assoc-ref opts 'cores)
|
#:build-cores (or (assoc-ref opts 'cores)
|
||||||
(current-processor-count)))
|
(current-processor-count)))
|
||||||
|
|
||||||
|
(if (assoc-ref opts 'derivations-only?)
|
||||||
|
(format #t "~{~a~%~}" drv)
|
||||||
(or (assoc-ref opts 'dry-run?)
|
(or (assoc-ref opts 'dry-run?)
|
||||||
(and (build-derivations %store drv)
|
(and (build-derivations %store drv)
|
||||||
(for-each (lambda (d)
|
(for-each (lambda (d)
|
||||||
|
@ -207,4 +214,4 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
|
||||||
(derivation-path->output-path
|
(derivation-path->output-path
|
||||||
d out-name)))
|
d out-name)))
|
||||||
(derivation-outputs drv)))))
|
(derivation-outputs drv)))))
|
||||||
drv)))))
|
drv))))))
|
||||||
|
|
Loading…
Reference in a new issue