guix build: Move package transformation options behind '--help-transform'.

This change declutters the '--help' output.

* guix/scripts/build.scm (show-build-options-help)
(%standard-build-options): Add '--help-transform'.
(show-transformation-options-help): Make private.
(show-help): Remove call to 'show-transformation-options-help'.
* guix/scripts/build.scm (show-help): Likewise.
* 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.
* doc/guix.texi (Package Transformation Options): Mention '--help-transform'.
This commit is contained in:
Ludovic Courtès 2020-10-12 15:16:51 +02:00
parent 6aeda81602
commit 6701f64f73
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
8 changed files with 16 additions and 18 deletions

View file

@ -9803,6 +9803,11 @@ Package transformation options are preserved across upgrades:
@command{guix upgrade} attempts to apply transformation options
initially used when creating the profile to the upgraded packages.
The available options are listed below. Most commands support them and
also support a @option{--help-transform} option that lists all the
available options and a synopsis (these options are not shown in the
@option{--help} output for brevity).
@table @code
@item --with-source=@var{source}

View file

@ -65,7 +65,6 @@ (define-module (guix scripts build)
%transformation-options
options->transformation
manifest-entry-with-transformations
show-transformation-options-help
guix-build
register-root
@ -717,6 +716,8 @@ (define (show-build-options-help)
-c, --cores=N allow the use of up to N CPU cores for the build"))
(display (G_ "
-M, --max-jobs=N allow at most N build jobs"))
(display (G_ "
--help-transform list package transformation options not shown here"))
(display (G_ "
--debug=LEVEL produce debugging output at LEVEL")))
@ -853,7 +854,14 @@ (define %standard-build-options
(if c
(apply values (alist-cons 'max-jobs c result) rest)
(leave (G_ "not a number: '~a' option argument: ~a~%")
name arg)))))))
name arg)))))
(option '("help-transform") #f #f
(lambda _
(format #t
(G_ "Available package transformation options:~%"))
(show-transformation-options-help)
(newline)
(exit 0)))))
;;;
@ -910,8 +918,6 @@ (define (show-help)
(newline)
(show-build-options-help)
(newline)
(show-transformation-options-help)
(newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "

View file

@ -179,8 +179,6 @@ (define (show-help)
(newline)
(show-build-options-help)
(newline)
(show-transformation-options-help)
(newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "

View file

@ -35,8 +35,7 @@ (define-module (guix scripts graph)
#:use-module ((guix diagnostics)
#:select (location-file formatted-message))
#:use-module ((guix scripts build)
#:select (show-transformation-options-help
options->transformation
#:select (options->transformation
%standard-build-options
%transformation-options))
#:use-module (srfi srfi-1)
@ -546,8 +545,6 @@ (define (show-help)
(display (G_ "
-L, --load-path=DIR prepend DIR to the package module search path"))
(newline)
(show-transformation-options-help)
(newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "

View file

@ -38,8 +38,6 @@ (define (show-help)
(newline)
(show-build-options-help)
(newline)
(show-transformation-options-help)
(newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "

View file

@ -1043,8 +1043,6 @@ (define (show-help)
Create a bundle of PACKAGE.\n"))
(show-build-options-help)
(newline)
(show-transformation-options-help)
(newline)
(display (G_ "
-f, --format=FORMAT build a pack in the given FORMAT"))
(display (G_ "

View file

@ -397,8 +397,6 @@ (define (show-help)
(newline)
(show-build-options-help)
(newline)
(show-transformation-options-help)
(newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "

View file

@ -41,8 +41,6 @@ (define (show-help)
(newline)
(show-build-options-help)
(newline)
(show-transformation-options-help)
(newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "