depot/third_party/nixpkgs/pkgs/tools/virtualization/kubevirt/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

53 lines
1.2 KiB
Nix

{ buildGoModule
, fetchFromGitHub
, installShellFiles
, lib
, testers
, kubevirt
}:
buildGoModule rec {
pname = "kubevirt";
version = "0.55.0";
src = fetchFromGitHub {
owner = "kubevirt";
repo = "kubevirt";
rev = "v${version}";
sha256 = "sha256-Nz1x1kFywMbVTPYFQFnTbx+SQs5ZY4pMijo7FFttmxg=";
};
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}"
];
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 ];
};
}