mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-03 19:43:30 +00:00
lima: prefer version testing in installCheckPhase rather than passthru.tests.version
This commit is contained in:
parent
d90d79a605
commit
f28ecbe89a
@ -7,7 +7,6 @@
|
|||||||
qemu,
|
qemu,
|
||||||
sigtool,
|
sigtool,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
testers,
|
|
||||||
nix-update-script,
|
nix-update-script,
|
||||||
apple-sdk_15,
|
apple-sdk_15,
|
||||||
lima,
|
lima,
|
||||||
@ -72,14 +71,19 @@ buildGoModule rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
# Workaround for: "panic: $HOME is not defined" at https://github.com/lima-vm/lima/blob/v1.0.2/pkg/limayaml/defaults.go#L52
|
||||||
|
# Don't use versionCheckHook for this package. It cannot inject environment variables.
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
|
if [[ "$(HOME="$(mktemp -d)" "$out/bin/limactl" --version | cut -d ' ' -f 3)" == "${version}" ]]; then
|
||||||
|
echo '${pname} smoke check passed'
|
||||||
|
else
|
||||||
|
echo '${pname} smoke check failed'
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
USER=nix $out/bin/limactl validate templates/default.yaml
|
USER=nix $out/bin/limactl validate templates/default.yaml
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru.updateScript = nix-update-script { };
|
||||||
tests.version = testers.testVersion { package = lima; };
|
|
||||||
updateScript = nix-update-script { };
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/lima-vm/lima";
|
homepage = "https://github.com/lima-vm/lima";
|
||||||
|
Loading…
Reference in New Issue
Block a user