summary refs log tree commit diff
path: root/pkgs/stdenv/generic/setup.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-09-07 22:24:27 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-09-07 22:24:27 +0200
commit0061fae2e6fd62f6d2a76418b62815bd49add51c (patch)
tree44d14f2e52b4bd9664794fa077c5f53fd19fc0db /pkgs/stdenv/generic/setup.sh
parent6b3cef22461d33bb829aafd3b166fd3c9828731b (diff)
downloadnixpkgs-0061fae2e6fd62f6d2a76418b62815bd49add51c.tar
nixpkgs-0061fae2e6fd62f6d2a76418b62815bd49add51c.tar.gz
nixpkgs-0061fae2e6fd62f6d2a76418b62815bd49add51c.tar.bz2
nixpkgs-0061fae2e6fd62f6d2a76418b62815bd49add51c.tar.lz
nixpkgs-0061fae2e6fd62f6d2a76418b62815bd49add51c.tar.xz
nixpkgs-0061fae2e6fd62f6d2a76418b62815bd49add51c.tar.zst
nixpkgs-0061fae2e6fd62f6d2a76418b62815bd49add51c.zip
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
Diffstat (limited to 'pkgs/stdenv/generic/setup.sh')
-rw-r--r--pkgs/stdenv/generic/setup.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index 8a000091491..ce8c3ecef82 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -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