Skip to content

Commit

Permalink
runInLinuxVM: refactor vmRunCommand
Browse files Browse the repository at this point in the history
This makes it simpler to copy more files to xchg for the structuredAttrs
case in the next commit.
  • Loading branch information
wolfgangwalther committed Nov 30, 2024
1 parent 437e6db commit 58570e7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkgs/build-support/vm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 58570e7

Please sign in to comment.