Unverified Commit 437e6dbb authored by Wolfgang Walther's avatar Wolfgang Walther
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]: 97ed6b45
parent 9f6b99e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,6 @@ rec {
    if [ -f "''${NIX_ATTRS_SH_FILE-}" ]; then
      source "$NIX_ATTRS_SH_FILE"
    fi
    source $stdenv/setup

    export NIX_STORE=${storeDir}
    export NIX_BUILD_TOP=/tmp
@@ -177,6 +176,7 @@ rec {
    export PATH=/empty
    cd "$NIX_BUILD_TOP"

    source $stdenv/setup
    if ! test -e /bin/sh; then
      ${coreutils}/bin/mkdir -p /bin
      ${coreutils}/bin/ln -s ${bash}/bin/sh /bin/sh