runInLinuxVM: re-add sourcing of stdenv & .attrs.sh
This is required for `preVM` which can be arbitrary code: e.g. `vmTools.createEmptyImage` assumes the presence of `$out` in its default configuration. Also, before this patch, `preVM` wasn't even set in the `__structuredAttrs` case.
This commit is contained in:
parent
ecdda28a3a
commit
26eba25577
@ -240,6 +240,10 @@ rec {
|
||||
|
||||
|
||||
vmRunCommand = qemuCommand: writeText "vm-run" ''
|
||||
if [ -f "''${NIX_ATTRS_SH_FILE-}" ]; then
|
||||
source "$NIX_ATTRS_SH_FILE"
|
||||
fi
|
||||
source $stdenv/setup
|
||||
export > saved-env
|
||||
|
||||
PATH=${coreutils}/bin
|
||||
|
Loading…
Reference in New Issue
Block a user