foundation/basic: Set the phase for nom
https://github.com/maralorn/nix-output-monitor
1a9ba0d6fe/src/libutil/logging.cc (L441)
Co-authored-by: dawn <dawnofmidnight@duck.com>
This commit is contained in:
parent
57a4021ce9
commit
0b7e7d1e52
1 changed files with 6 additions and 0 deletions
|
|
@ -50,6 +50,12 @@ in
|
|||
script = lib.strings.concatMapSep "\n" (entry: ''
|
||||
# Phase: ${entry.name}
|
||||
# ====================================================
|
||||
if [[ -v NIX_LOG_FD ]]; then
|
||||
# Sends a JSON command to the Nix build daemon, which sets the phase of the build allowing
|
||||
# nix-output-monitor to display the phase properly.
|
||||
# https://github.com/NixOS/nix/blob/1a9ba0d6fe7b6c05e8bbe1c59ead420759b631cc/src/libutil/logging.cc#L441
|
||||
echo '@nix { "action": "setPhase", "phase": "${entry.name}" }' >&"$NIX_LOG_FD"
|
||||
fi
|
||||
${entry.value}
|
||||
'') sorted.result;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue