summaryrefslogtreecommitdiff
path: root/guix/transformations.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-11-21 12:14:04 +0100
committerLudovic Courtès <ludo@gnu.org>2020-11-21 12:39:14 +0100
commite79ecff045094a75226439a6284306475a2f907e (patch)
treed1f06c70eaf447932837fb138bad208b6821a747 /guix/transformations.scm
parentac435c14a627f620bf6719efbdd214a12b33716e (diff)
transformations: Show '--help-transform' only where applicable.
Fixes <https://bugs.gnu.org/44773>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. This fixes a regression introduced in 6701f64f7329cdbeda70bcaf38523c9098e5a938. * guix/transformations.scm (%transformation-options): Add "--help-transform". (show-transformation-options-help): Rename to... (show-transformation-options-help/detailed): ... this. (show-transformation-options-help): New public procedure. * guix/scripts/build.scm (show-build-options-help): Remove "--help-transform". (%standard-build-options): Likewise. (show-help): Call 'show-transformation-options-help'. * guix/scripts/environment.scm (show-help): Likewise. * guix/scripts/graph.scm (show-help): Likewise. * guix/scripts/install.scm (show-help): Likewise. * guix/scripts/pack.scm (show-help): Likewise. * guix/scripts/package.scm (show-help): Likewise. * guix/scripts/upgrade.scm (show-help): Likewise.
Diffstat (limited to 'guix/transformations.scm')
-rw-r--r--guix/transformations.scm16
1 files changed, 14 insertions, 2 deletions
diff --git a/guix/transformations.scm b/guix/transformations.scm
index 30142dd059..d49041cf59 100644
--- a/guix/transformations.scm
+++ b/guix/transformations.scm
@@ -508,9 +508,17 @@ to the same package but with #:strip-binaries? #f in its 'arguments' field."
(option '("with-debug-info") #t #f
(parser 'with-debug-info))
(option '("without-tests") #t #f
- (parser 'without-tests)))))
+ (parser 'without-tests))
-(define (show-transformation-options-help)
+ (option '("help-transform") #f #f
+ (lambda _
+ (format #t
+ (G_ "Available package transformation options:~%"))
+ (show-transformation-options-help/detailed)
+ (newline)
+ (exit 0))))))
+
+(define (show-transformation-options-help/detailed)
(display (G_ "
--with-source=[PACKAGE=]SOURCE
use SOURCE when building the corresponding package"))
@@ -539,6 +547,10 @@ to the same package but with #:strip-binaries? #f in its 'arguments' field."
--without-tests=PACKAGE
build PACKAGE without running its tests")))
+(define (show-transformation-options-help)
+ "Show basic help for package transformation options."
+ (display (G_ "
+ --help-transform list package transformation options not shown here")))
(define (options->transformation opts)
"Return a procedure that, when passed an object to build (package,