From 6701f64f7329cdbeda70bcaf38523c9098e5a938 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 12 Oct 2020 15:16:51 +0200 Subject: 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'. --- guix/scripts/build.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'guix/scripts/build.scm') diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 6ca669d172..f4a8af035b 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -65,7 +65,6 @@ %transformation-options options->transformation manifest-entry-with-transformations - show-transformation-options-help guix-build register-root @@ -717,6 +716,8 @@ options handled by 'set-build-options-from-command-line', and listed in -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 @@ use '--no-offload' instead~%"))) (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 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n")) (newline) (show-build-options-help) (newline) - (show-transformation-options-help) - (newline) (display (G_ " -h, --help display this help and exit")) (display (G_ " -- cgit v1.2.3