stdenv: Print _allFlags debug output to stderr

In the default `fixupPhase` the output of `substituteAllStream` is
streamed to setup-hook.

`stdenv.cc.bintools.overrideAttrs { NIX_DEBUG = 6; }`

With `NIX_DEBUG` contains:

```
@expandResponseParams@ -> /nix/store/yl01rd58vp4m8bbhkihpk132cprfmx6f-expand-response-params/bin/expand-response-params
...
```
This commit is contained in:
Artturin 2023-08-10 14:59:58 +03:00
parent 72b94272c9
commit 87db45704f

View File

@ -933,7 +933,7 @@ _allFlags() {
export system pname name version
for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'); do
if (( "${NIX_DEBUG:-0}" >= 1 )); then
printf "@%s@ -> %q\n" "${varName}" "${!varName}"
printf "@%s@ -> %q\n" "${varName}" "${!varName}" >&2
fi
args+=("--subst-var" "$varName")
done