diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index e204a2b19543..bb9c2c7368ac 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -230,16 +230,15 @@ rec { vmRunCommand = qemuCommand: writeText "vm-run" '' - export > saved-env + ${coreutils}/bin/mkdir xchg + export > xchg/saved-env + PATH=${coreutils}/bin + if [ -f "''${NIX_ATTRS_SH_FILE-}" ]; then source "$NIX_ATTRS_SH_FILE" fi source $stdenv/setup - PATH=${coreutils}/bin - mkdir xchg - mv saved-env xchg/ - eval "$preVM" if [ "$enableParallelBuilding" = 1 ]; then