2022-06-03 10:54:35 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2019-07-03 11:00:27 +00:00
|
|
|
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;
|
2019-07-03 11:00:27 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-08-03 08:49:15 +00:00
|
|
|
rev = rev;
|
2019-07-03 11:00:27 +00:00
|
|
|
owner = "kubernetes";
|
|
|
|
repo = "kops";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2022-06-03 10:54:35 +00:00
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-03-18 09:23:22 +00:00
|
|
|
subPackages = [ "cmd/kops" ];
|
2019-07-03 11:00:27 +00:00
|
|
|
|
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}"
|
|
|
|
];
|
2019-07-03 11:00:27 +00:00
|
|
|
|
2022-06-03 10:54:35 +00:00
|
|
|
doCheck = false;
|
2019-07-03 11:00:27 +00:00
|
|
|
|
|
|
|
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)
|
2019-07-03 11:00:27 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-03 11:00:27 +00:00
|
|
|
description = "Easiest way to get a production Kubernetes up and running";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/kubernetes/kops";
|
2020-09-10 08:47:24 +00:00
|
|
|
changelog = "https://github.com/kubernetes/kops/tree/master/docs/releases";
|
2019-07-03 11:00:27 +00:00
|
|
|
license = licenses.asl20;
|
2022-03-23 00:32:23 +00:00
|
|
|
maintainers = with maintainers; [ offline zimbatm diegolelis yurrriq ];
|
2019-07-03 11:00:27 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
} // attrs';
|
2020-09-10 08:47:24 +00:00
|
|
|
in
|
|
|
|
rec {
|
2019-07-03 11:00:27 +00:00
|
|
|
mkKops = generic;
|
|
|
|
|
2022-03-23 00:31:09 +00:00
|
|
|
kops_1_23 = mkKops rec {
|
2022-09-19 22:25:27 +00:00
|
|
|
version = "1.23.4";
|
|
|
|
sha256 = "sha256-hUj/kUyaqo8q3SJTkd5+9Ld8kfE8wCYNJ2qIATjXqhU=";
|
2022-03-23 00:31:09 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
};
|
2022-07-08 06:44:23 +00:00
|
|
|
|
|
|
|
kops_1_24 = mkKops rec {
|
2022-09-16 16:59:11 +00:00
|
|
|
version = "1.24.3";
|
|
|
|
sha256 = "sha256-o84060P2aHTIm61lSkz2/GqzYd2NYk1zKgGdNaHlWfA=";
|
2022-07-08 06:44:23 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
};
|
|
|
|
|
2022-09-19 22:25:27 +00:00
|
|
|
kops_1_25 = mkKops rec {
|
2022-11-26 11:55:46 +00:00
|
|
|
version = "1.25.3";
|
|
|
|
sha256 = "sha256-Q40d62D+H7CpLmrjweCy75U3LgnHEV2pFZs2Ze+koqo=";
|
2022-09-19 22:25:27 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
};
|
2016-10-09 17:25:39 +00:00
|
|
|
}
|