lib.packagesFromDirectoryRecursive: Improved documentation (#359898)
[NixPkgs.git] / pkgs / by-name / ku / kubeone / package.nix
blobd888cdfe5d6cef22f1eba9bb1377391748cc90e3
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , installShellFiles
5 , kubeone
6 , testers
7 }:
9 buildGoModule rec {
10   pname = "kubeone";
11   version = "1.8.3";
13   src = fetchFromGitHub {
14     owner = "kubermatic";
15     repo = "kubeone";
16     rev = "v${version}";
17     hash = "sha256-+9Dw6W/Tbg7zRC/ARuuXqZGTcMeSrtdoTvHtsQevigg=";
18   };
20   vendorHash = "sha256-z1BBE+PH2s7VxWNxneu5y2ZerfzCZNPJowZJVq821Kk=";
22   ldflags = [
23     "-s"
24     "-w"
25     "-X k8c.io/kubeone/pkg/cmd.version=${version}"
26     "-X k8c.io/kubeone/pkg/cmd.date=unknown"
27   ];
29   nativeBuildInputs = [
30     installShellFiles
31   ];
33   postInstall = ''
34     installShellCompletion --cmd kubeone \
35       --bash <($out/bin/kubeone completion bash) \
36       --zsh <($out/bin/kubeone completion zsh)
37   '';
39   passthru.tests.version = testers.testVersion {
40     package = kubeone;
41     command = "kubeone version";
42   };
44   meta = with lib; {
45     description = "Automate cluster operations on all your cloud, on-prem, edge, and IoT environments";
46     homepage = "https://kubeone.io/";
47     changelog = "https://github.com/kubermatic/kubeone/releases/tag/v${version}";
48     license = licenses.asl20;
49     maintainers = with maintainers; [ lblasc ];
50   };