mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
stdenv: do not leak outputName out of loop
This is an implementation detail leaking out into the bash environment and it did manange to confuse me as potentially being a way to get the "default" output name when structuredAttrs is enabled, because of the "outputName" derivation attribute.
This commit is contained in:
parent
14b995ab3a
commit
fea908fde9
1 changed files with 9 additions and 4 deletions
|
|
@ -29,10 +29,15 @@ if [[ -n "${NIX_ATTRS_JSON_FILE:-}" ]]; then
|
|||
__structuredAttrs=1
|
||||
echo "structuredAttrs is enabled"
|
||||
|
||||
for outputName in "${!outputs[@]}"; do
|
||||
# ex: out=/nix/store/...
|
||||
export "$outputName=${outputs[$outputName]}"
|
||||
done
|
||||
_exportOutputsByName() {
|
||||
local outputName
|
||||
for outputName in "${!outputs[@]}"; do
|
||||
# ex: out=/nix/store/...
|
||||
export "$outputName=${outputs[$outputName]}"
|
||||
done
|
||||
}
|
||||
|
||||
_exportOutputsByName
|
||||
else
|
||||
__structuredAttrs=
|
||||
: "${outputs:=out}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue