2022-05-08 21:11:41 +01:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
2022-05-12 13:32:17 +01:00
|
|
|
, installShellFiles
|
2022-05-08 21:11:41 +01:00
|
|
|
, lib
|
|
|
|
, testers
|
|
|
|
, kubevirt
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "kubevirt";
|
2022-09-26 19:50:34 +01:00
|
|
|
version = "0.57.1";
|
2022-05-08 21:11:41 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kubevirt";
|
|
|
|
repo = "kubevirt";
|
|
|
|
rev = "v${version}";
|
2022-09-26 19:50:34 +01:00
|
|
|
sha256 = "sha256-b832NNAoLYiHfvAm2eWGa8Odlppj8hLKl7jQA09s+4k=";
|
2022-05-08 21:11:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
subPackages = [ "cmd/virtctl" ];
|
|
|
|
|
|
|
|
tags = [ "selinux" ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-X kubevirt.io/client-go/version.gitCommit=v${version}"
|
|
|
|
"-X kubevirt.io/client-go/version.gitTreeState=clean"
|
|
|
|
"-X kubevirt.io/client-go/version.gitVersion=v${version}"
|
|
|
|
];
|
|
|
|
|
2022-05-12 13:32:17 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd virtctl \
|
|
|
|
--bash <($out/bin/virtctl completion bash) \
|
|
|
|
--fish <($out/bin/virtctl completion fish) \
|
|
|
|
--zsh <($out/bin/virtctl completion zsh)
|
|
|
|
'';
|
|
|
|
|
2022-05-08 21:11:41 +01:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = kubevirt;
|
|
|
|
command = "virtctl version --client";
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Client tool to use advanced features such as console access";
|
|
|
|
homepage = "https://kubevirt.io/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ haslersn ];
|
|
|
|
};
|
|
|
|
}
|