Skip to content

Commit afef658

Browse files
committed
stdenv/setup.sh: Allow NIX_ATTRS_{JSON,SH}_FILE to be set correctly by Nix
1 parent 8702f45 commit afef658

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

pkgs/stdenv/generic/setup.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@ if [ -n "$__structuredAttrs" ]; then
2828
# ex: out=/nix/store/...
2929
export "$outputName=${outputs[$outputName]}"
3030
done
31-
# $NIX_ATTRS_JSON_FILE points to the wrong location in sandbox
32-
# https://github.com/NixOS/nix/issues/6736
33-
export NIX_ATTRS_JSON_FILE="$NIX_BUILD_TOP/.attrs.json"
34-
export NIX_ATTRS_SH_FILE="$NIX_BUILD_TOP/.attrs.sh"
31+
32+
# $NIX_ATTRS_JSON_FILE pointed to the wrong location in sandbox
33+
# https://github.com/NixOS/nix/issues/6736; please keep around until the
34+
# fix reaches *every patch version* that's >= lib/minver.nix
35+
if ! [[ -e "$NIX_ATTRS_JSON_FILE" ]]; then
36+
export NIX_ATTRS_JSON_FILE="$NIX_BUILD_TOP/.attrs.json"
37+
fi
38+
if ! [[ -e "$NIX_ATTRS_SH_FILE" ]]; then
39+
export NIX_ATTRS_SH_FILE="$NIX_BUILD_TOP/.attrs.sh"
40+
fi
3541
else
3642
: "${outputs:=out}"
3743
fi

0 commit comments

Comments
 (0)