mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-31 01:02:20 +00:00
vmTools.runInLinuxVM: do not run postHook on the host
Since 26eba25577 ("runInLinuxVM: re-add sourcing of stdenv &
.attrs.sh"), the host side of runInLinuxVM sources $stdenv/setup so that
preVM can use $out. That also runs postHook on the host, but postHook is
meant for the build inside the VM. runInLinuxImage sets PATH to the
guest's /usr/bin:/bin in postHook, so releaseTools.debBuild's
propagateImageName then failed on the host with
"mkdir: command not found".
Fixes #433008
Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
@@ -293,6 +293,10 @@ let
|
||||
${coreutils}/bin/cp $NIX_ATTRS_JSON_FILE $NIX_ATTRS_SH_FILE xchg
|
||||
source "$NIX_ATTRS_SH_FILE"
|
||||
fi
|
||||
# The setup script is sourced here only so that `preVM` sees `$out` and
|
||||
# friends. `postHook` belongs to the build inside the VM, where it may
|
||||
# rely on the guest's tools (see `runInLinuxImage`), so skip it here.
|
||||
postHook=
|
||||
source $stdenv/setup
|
||||
|
||||
eval "$preVM"
|
||||
|
||||
Reference in New Issue
Block a user