Skip to content

Commit 437e6db

Browse files
runInLinuxVM: load stdenv/setup with fixed environment in stage2Init
In [1] we started sourcing stdenv/setup in stage2Init to allow for structuredAttrs. We failed to take the changed NIX_BUILD_TOP etc. variables into account. We need to load stdenv/setup after changing them, because the structuredAttrs startup code makes use of it. [1]: 97ed6b4
1 parent 9f6b99e commit 437e6db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkgs/build-support/vm/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ rec {
169169
if [ -f "''${NIX_ATTRS_SH_FILE-}" ]; then
170170
source "$NIX_ATTRS_SH_FILE"
171171
fi
172-
source $stdenv/setup
173172
174173
export NIX_STORE=${storeDir}
175174
export NIX_BUILD_TOP=/tmp
176175
export TMPDIR=/tmp
177176
export PATH=/empty
178177
cd "$NIX_BUILD_TOP"
179178
179+
source $stdenv/setup
180180
if ! test -e /bin/sh; then
181181
${coreutils}/bin/mkdir -p /bin
182182
${coreutils}/bin/ln -s ${bash}/bin/sh /bin/sh

0 commit comments

Comments
 (0)