1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

home-manager: support --log-format flag (#6093)

You can now pass `--log-format FORMAT` to `nix-build`,
useful for piping into `nix-output-monitor`.
This commit is contained in:
imsuck 2025-03-18 08:31:34 +07:00 committed by Austin Horstman
parent 22a36aa709
commit 229648c51e
2 changed files with 10 additions and 1 deletions

View file

@ -45,6 +45,7 @@
.Op Fl -keep-failed .Op Fl -keep-failed
.Op Fl -keep-going .Op Fl -keep-going
.Op Bro Fl L | Fl -print-build-logs Brc .Op Bro Fl L | Fl -print-build-logs Brc
.Op Fl -log-format
.Op Fl -show-trace .Op Fl -show-trace
.Op Fl -(no-)substitute .Op Fl -(no-)substitute
.Op Fl -no-out-link .Op Fl -no-out-link
@ -335,6 +336,13 @@ when building from a flake\&.
.RE .RE
.Pp .Pp
.It Cm Fl -log-format Ar format
.RS 4
Passed on to
\fBnix-build\fR(1)\&.
.RE
.Pp
.It Cm Fl -show-trace .It Cm Fl -show-trace
.RS 4 .RS 4
Passed on to Passed on to

View file

@ -907,6 +907,7 @@ function doHelp() {
echo " -j, --max-jobs NUM" echo " -j, --max-jobs NUM"
echo " --option NAME VALUE" echo " --option NAME VALUE"
echo " -L, --print-build-logs" echo " -L, --print-build-logs"
echo " --log-format FORMAT"
echo " --show-trace" echo " --show-trace"
echo " --(no-)substitute" echo " --(no-)substitute"
echo " --no-out-link Do not create a symlink to the output path" echo " --no-out-link Do not create a symlink to the output path"
@ -1036,7 +1037,7 @@ while [[ $# -gt 0 ]]; do
PASSTHROUGH_OPTS+=("$opt" "$1" "$2") PASSTHROUGH_OPTS+=("$opt" "$1" "$2")
shift 2 shift 2
;; ;;
-j|--max-jobs|--cores|--builders) -j|--max-jobs|--cores|--builders|--log-format)
[[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt" [[ -v 1 && $1 != -* ]] || errMissingOptArg "$opt"
PASSTHROUGH_OPTS+=("$opt" "$1") PASSTHROUGH_OPTS+=("$opt" "$1")
shift shift