Merge: runInLinuxVM: fix createEmptyImage/preVM case (#358705)

This commit is contained in:
Maximilian Bosch 2024-11-24 14:38:14 +01:00 committed by GitHub
commit 626d3e44e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,6 @@ lib.makeExtensible (final: {
inherit memSize; inherit memSize;
} }
'' ''
rmdir "$out"
mkdir workspace mkdir workspace
mkfs -t ext3 -b 4096 /dev/${vmTools.hd} mkfs -t ext3 -b 4096 /dev/${vmTools.hd}
mount /dev/${vmTools.hd} workspace mount /dev/${vmTools.hd} workspace

View File

@ -240,6 +240,10 @@ rec {
vmRunCommand = qemuCommand: writeText "vm-run" '' vmRunCommand = qemuCommand: writeText "vm-run" ''
if [ -f "''${NIX_ATTRS_SH_FILE-}" ]; then
source "$NIX_ATTRS_SH_FILE"
fi
source $stdenv/setup
export > saved-env export > saved-env
PATH=${coreutils}/bin PATH=${coreutils}/bin