docs: Generate manpages from docs, use in CLI
Change-Id: I6a6a69646c6ff4c4b70cb928dc1df06890144429
This commit is contained in:
parent
5332df82bb
commit
30814de5e4
4 changed files with 26 additions and 45 deletions
|
|
@ -4,29 +4,13 @@
|
|||
(foreign-lambda* int ()
|
||||
"cpu_set_t set; sched_getaffinity(0, sizeof(set), &set); C_return(CPU_COUNT(&set));"))
|
||||
|
||||
(foreign-declare "#include \"man_go.h\"")
|
||||
(define man-page (foreign-value "man_go" nonnull-c-string))
|
||||
|
||||
(define (print-help msg)
|
||||
(when msg
|
||||
(write-string (string-append msg "\n\n") (current-error-port)))
|
||||
(write-string "Usage: zilch-cli-go [OPTION] [PACKAGE...]
|
||||
Process the given module (or the current directory, if unspecified) and
|
||||
output the store path for each package given on the command line (or
|
||||
all executables in the module, if unspecified)
|
||||
|
||||
-h, --help Print this help message.
|
||||
-j, --max-jobs COUNT The maximum amount of builds to run. Defaults
|
||||
to the amount of cores.
|
||||
-v, --verbose Increase the verbosity configured in the Nix
|
||||
daemon.
|
||||
-L, --print-build-logs Print derivation logs as they come in.
|
||||
-m, --module-dir DIR The directory to use as root module.
|
||||
-r, --replace DIR Replace the module specified by the go.mod
|
||||
with this source directory, rather than using
|
||||
the upstream module. Can be specified more
|
||||
than once.
|
||||
|
||||
--debug Crash on the first error, rather than
|
||||
continuing with the next package.
|
||||
" (current-error-port))
|
||||
(write-string man-page (current-error-port))
|
||||
(exit (or (not msg) 1)))
|
||||
|
||||
(define-values (options args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue