2022-05-18 14:49:53 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
, testers
|
|
|
|
, kubevirt
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "kubevirt";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.2.1";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kubevirt";
|
|
|
|
repo = "kubevirt";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-N7To46D8a64/fVDHOuRWt8xQduh/Lvi5C3/N9FhujmI=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
vendorHash = null;
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
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}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd virtctl \
|
|
|
|
--bash <($out/bin/virtctl completion bash) \
|
|
|
|
--fish <($out/bin/virtctl completion fish) \
|
|
|
|
--zsh <($out/bin/virtctl completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "virtctl";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
}
|