2019-07-03 11:00:27 +00:00
|
|
|
{ stdenv, lib, buildGoPackage, fetchFromGitHub, go-bindata }:
|
2016-10-09 17:25:39 +00:00
|
|
|
|
2019-07-03 11:00:27 +00:00
|
|
|
let
|
2016-10-09 17:25:39 +00:00
|
|
|
goPackagePath = "k8s.io/kops";
|
|
|
|
|
2019-07-03 11:00:27 +00:00
|
|
|
generic = { version, sha256, ...}@attrs:
|
|
|
|
let attrs' = builtins.removeAttrs attrs ["version" "sha256"] ; in
|
|
|
|
buildGoPackage {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "kops";
|
|
|
|
inherit version;
|
2019-07-03 11:00:27 +00:00
|
|
|
|
|
|
|
inherit goPackagePath;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = version;
|
|
|
|
owner = "kubernetes";
|
|
|
|
repo = "kops";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2020-03-18 09:23:22 +00:00
|
|
|
nativeBuildInputs = [ go-bindata ];
|
|
|
|
subPackages = [ "cmd/kops" ];
|
2019-07-03 11:00:27 +00:00
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X k8s.io/kops.Version=${version}
|
|
|
|
-X k8s.io/kops.GitVersion=${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
(cd go/src/k8s.io/kops
|
|
|
|
go-bindata -o upup/models/bindata.go -pkg models -prefix upup/models/ upup/models/...)
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $bin/share/bash-completion/completions
|
|
|
|
mkdir -p $bin/share/zsh/site-functions
|
|
|
|
$bin/bin/kops completion bash > $bin/share/bash-completion/completions/kops
|
|
|
|
$bin/bin/kops completion zsh > $bin/share/zsh/site-functions/_kops
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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";
|
2019-07-03 11:00:27 +00:00
|
|
|
license = licenses.asl20;
|
2020-03-18 09:23:22 +00:00
|
|
|
maintainers = with maintainers; [ offline zimbatm kampka ];
|
2019-07-03 11:00:27 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
} // attrs';
|
|
|
|
in rec {
|
|
|
|
|
|
|
|
mkKops = generic;
|
|
|
|
|
|
|
|
kops_1_12 = mkKops {
|
2019-08-05 14:05:25 +00:00
|
|
|
version = "1.12.3";
|
|
|
|
sha256 = "0rpbaz54l5v1z7ab5kpxcb4jyakkl5ysgz1sxajqmw2d6dvf7xly";
|
2016-10-09 17:25:39 +00:00
|
|
|
};
|
2019-08-05 14:03:44 +00:00
|
|
|
|
|
|
|
kops_1_13 = mkKops {
|
2019-09-26 10:47:29 +00:00
|
|
|
version = "1.13.2";
|
|
|
|
sha256 = "0lkkg34vn020r62ga8vg5d3a8jwvq00xlv3p1s01nkz33f6salng";
|
2019-08-05 14:03:44 +00:00
|
|
|
};
|
2020-03-18 09:23:22 +00:00
|
|
|
|
2019-10-01 17:03:02 +00:00
|
|
|
kops_1_14 = mkKops {
|
2019-11-08 10:33:47 +00:00
|
|
|
version = "1.14.1";
|
|
|
|
sha256 = "0ikd8qwrjh8s1sc95g18sm0q6p33swz2m1rjd8zw34mb2w9jv76n";
|
2019-10-01 17:03:02 +00:00
|
|
|
};
|
2019-12-03 13:21:56 +00:00
|
|
|
|
|
|
|
kops_1_15 = mkKops {
|
2020-02-11 20:35:35 +00:00
|
|
|
version = "1.15.2";
|
|
|
|
sha256 = "1sjfd7pfi81ccq1dkgkh9xx6y94bqzlp727pvyf7l01x3d14z2b3";
|
2019-12-03 13:21:56 +00:00
|
|
|
};
|
2020-02-27 09:59:41 +00:00
|
|
|
|
|
|
|
kops_1_16 = mkKops {
|
|
|
|
version = "1.16.0";
|
|
|
|
sha256 = "1b2lzf6b29rs5imbpqp8gnp3b511lk7jrm2f62y32gmx0gyjws6a";
|
|
|
|
};
|
2016-10-09 17:25:39 +00:00
|
|
|
}
|