diff --git a/tidepool/src/builders/foundation/basic.nix b/tidepool/src/builders/foundation/basic.nix index 1210d43..e59a537 100644 --- a/tidepool/src/builders/foundation/basic.nix +++ b/tidepool/src/builders/foundation/basic.nix @@ -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;