nixpkgs/pkgs/by-name/ku/kubevirt/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.2 KiB
Nix
Raw Normal View History

{ buildGoModule
, fetchFromGitHub
2022-05-12 12:32:17 +00:00
, installShellFiles
, lib
, testers
, kubevirt
}:
buildGoModule rec {
pname = "kubevirt";
2024-09-04 15:54:58 +00:00
version = "1.3.1";
src = fetchFromGitHub {
owner = "kubevirt";
repo = "kubevirt";
rev = "v${version}";
2024-09-04 15:54:58 +00:00
hash = "sha256-t6lIHuMvo8iqYkZ1mYVU6fgOP3Q6sqWaTcFLTqAIm5c=";
};
2023-04-09 21:46:09 +00:00
vendorHash = 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 12:32:17 +00: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)
'';
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 ];
2023-11-23 21:09:35 +00:00
mainProgram = "virtctl";
};
}