Skip to content

Commit 58570e7

Browse files
runInLinuxVM: refactor vmRunCommand
This makes it simpler to copy more files to xchg for the structuredAttrs case in the next commit.
1 parent 437e6db commit 58570e7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pkgs/build-support/vm/default.nix

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,15 @@ rec {
230230

231231

232232
vmRunCommand = qemuCommand: writeText "vm-run" ''
233-
export > saved-env
233+
${coreutils}/bin/mkdir xchg
234+
export > xchg/saved-env
235+
PATH=${coreutils}/bin
236+
234237
if [ -f "''${NIX_ATTRS_SH_FILE-}" ]; then
235238
source "$NIX_ATTRS_SH_FILE"
236239
fi
237240
source $stdenv/setup
238241
239-
PATH=${coreutils}/bin
240-
mkdir xchg
241-
mv saved-env xchg/
242-
243242
eval "$preVM"
244243
245244
if [ "$enableParallelBuilding" = 1 ]; then

0 commit comments

Comments
 (0)