lima: prefer versionCheckHook
This commit is contained in:
parent
f6248cd5f8
commit
ac8cc91011
@ -12,6 +12,7 @@
|
|||||||
withAdditionalGuestAgents ? false,
|
withAdditionalGuestAgents ? false,
|
||||||
lima-additional-guestagents,
|
lima-additional-guestagents,
|
||||||
writableTmpDirAsHomeHook,
|
writableTmpDirAsHomeHook,
|
||||||
|
versionCheckHook,
|
||||||
testers,
|
testers,
|
||||||
writeText,
|
writeText,
|
||||||
runCommand,
|
runCommand,
|
||||||
@ -92,14 +93,16 @@ buildGoModule (finalAttrs: {
|
|||||||
nativeInstallCheckInputs = [
|
nativeInstallCheckInputs = [
|
||||||
# Workaround for: "panic: $HOME is not defined" at https://github.com/lima-vm/lima/blob/cb99e9f8d01ebb82d000c7912fcadcd87ec13ad5/pkg/limayaml/defaults.go#L53
|
# Workaround for: "panic: $HOME is not defined" at https://github.com/lima-vm/lima/blob/cb99e9f8d01ebb82d000c7912fcadcd87ec13ad5/pkg/limayaml/defaults.go#L53
|
||||||
writableTmpDirAsHomeHook
|
writableTmpDirAsHomeHook
|
||||||
|
versionCheckHook
|
||||||
];
|
];
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
versionCheckProgram = "${placeholder "out"}/bin/limactl";
|
||||||
|
versionCheckProgramArg = "--version";
|
||||||
|
versionCheckKeepEnvironment = [ "HOME" ];
|
||||||
|
|
||||||
# Don't use versionCheckHook for this package until Env solutions like #403971 or #411609 are available on the master branch.
|
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
runHook preInstallCheck
|
runHook preInstallCheck
|
||||||
|
|
||||||
[[ "$("$out/bin/limactl" --version | cut -d ' ' -f 3)" == "${finalAttrs.version}" ]]
|
|
||||||
USER=nix $out/bin/limactl validate templates/default.yaml
|
USER=nix $out/bin/limactl validate templates/default.yaml
|
||||||
|
|
||||||
runHook postInstallCheck
|
runHook postInstallCheck
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user