mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, kubeone
|
|
, testers
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "kubeone";
|
|
version = "1.5.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kubermatic";
|
|
repo = "kubeone";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-CjT6YKC6DJvs+LeKIzOl2Y6n0/yGv0nz8EfHqiSnIDo=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-Y4eivDchnN2rtQWjFY3cFiJXRfj48UfVUKM/OLuWXGA=";
|
|
|
|
ldflags = [
|
|
"-s -w"
|
|
"-X k8c.io/kubeone/pkg/cmd.version=${version}"
|
|
"-X k8c.io/kubeone/pkg/cmd.date=unknown"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd kubeone \
|
|
--bash <($out/bin/kubeone completion bash) \
|
|
--zsh <($out/bin/kubeone completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = kubeone;
|
|
command = "kubeone version";
|
|
};
|
|
|
|
meta = {
|
|
description = "Automate cluster operations on all your cloud, on-prem, edge, and IoT environments.";
|
|
homepage = "https://kubeone.io/";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ lblasc ];
|
|
};
|
|
}
|