nixpkgs/pkgs/applications/networking/cluster/kops/default.nix

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

69 lines
1.8 KiB
Nix
Raw Normal View History

2022-06-03 10:54:35 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
let
2020-09-10 08:47:24 +00:00
generic = { version, sha256, rev ? version, ... }@attrs:
let attrs' = builtins.removeAttrs attrs [ "version" "sha256" "rev" ]; in
2022-06-03 10:54:35 +00:00
buildGoModule
2020-09-10 08:47:24 +00:00
{
2019-08-13 21:52:01 +00:00
pname = "kops";
inherit version;
src = fetchFromGitHub {
2020-08-03 08:49:15 +00:00
rev = rev;
owner = "kubernetes";
repo = "kops";
inherit sha256;
};
2023-05-07 05:29:09 +00:00
vendorHash = null;
2022-06-03 10:54:35 +00:00
nativeBuildInputs = [ installShellFiles ];
2020-03-18 09:23:22 +00:00
subPackages = [ "cmd/kops" ];
2021-08-26 03:31:57 +00:00
ldflags = [
2022-06-03 10:54:35 +00:00
"-s"
"-w"
2021-08-26 03:31:57 +00:00
"-X k8s.io/kops.Version=${version}"
"-X k8s.io/kops.GitVersion=${version}"
];
2022-06-03 10:54:35 +00:00
doCheck = false;
postInstall = ''
2022-06-03 10:54:35 +00:00
installShellCompletion --cmd kops \
--bash <($GOPATH/bin/kops completion bash) \
--fish <($GOPATH/bin/kops completion fish) \
--zsh <($GOPATH/bin/kops completion zsh)
'';
meta = with lib; {
description = "Easiest way to get a production Kubernetes up and running";
homepage = "https://github.com/kubernetes/kops";
2020-09-10 08:47:24 +00:00
changelog = "https://github.com/kubernetes/kops/tree/master/docs/releases";
license = licenses.asl20;
2022-03-23 00:32:23 +00:00
maintainers = with maintainers; [ offline zimbatm diegolelis yurrriq ];
};
} // attrs';
2020-09-10 08:47:24 +00:00
in
rec {
mkKops = generic;
kops_1_25 = mkKops rec {
2023-03-20 09:05:20 +00:00
version = "1.25.4";
2022-11-26 11:55:46 +00:00
sha256 = "sha256-Q40d62D+H7CpLmrjweCy75U3LgnHEV2pFZs2Ze+koqo=";
rev = "v${version}";
};
2023-03-20 09:08:42 +00:00
kops_1_26 = mkKops rec {
version = "1.26.5";
sha256 = "sha256-DbKzqfcQCHP3ZWJQcRhPDkKVzHB/MkcfukguUDG4UQg=";
rev = "v${version}";
};
kops_1_27 = mkKops rec {
version = "1.27.0";
sha256 = "sha256-XJOdqOT/vMVXZmVasXRb+pdmWcSd6lsyQDCnZKyqrto=";
2023-03-20 09:08:42 +00:00
rev = "v${version}";
};
2016-10-09 17:25:39 +00:00
}