genericBuild: Communicate the current build phase to Nix

This allows the progress bar to show e.g.

  [1/9/59 built] building bison-3.0.4 (configurePhase): checking for strdup... yes
This commit is contained in:
Eelco Dolstra 2017-09-07 22:24:27 +02:00
parent 6b3cef2246
commit 0061fae2e6

View File

@ -1016,6 +1016,10 @@ genericBuild() {
if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then continue; fi
if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then continue; fi
if [[ -n $NIX_LOG_FD ]]; then
echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" >&$NIX_LOG_FD
fi
showPhaseHeader "$curPhase"
dumpVars