mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
runInLinuxVM: refactor vmRunCommand
This makes it simpler to copy more files to xchg for the structuredAttrs case in the next commit.
This commit is contained in:
parent
437e6dbbb0
commit
58570e75d9
@ -230,16 +230,15 @@ rec {
|
|||||||
|
|
||||||
|
|
||||||
vmRunCommand = qemuCommand: writeText "vm-run" ''
|
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
|
if [ -f "''${NIX_ATTRS_SH_FILE-}" ]; then
|
||||||
source "$NIX_ATTRS_SH_FILE"
|
source "$NIX_ATTRS_SH_FILE"
|
||||||
fi
|
fi
|
||||||
source $stdenv/setup
|
source $stdenv/setup
|
||||||
|
|
||||||
PATH=${coreutils}/bin
|
|
||||||
mkdir xchg
|
|
||||||
mv saved-env xchg/
|
|
||||||
|
|
||||||
eval "$preVM"
|
eval "$preVM"
|
||||||
|
|
||||||
if [ "$enableParallelBuilding" = 1 ]; then
|
if [ "$enableParallelBuilding" = 1 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user