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

45 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, buildGoPackage, fetchFromGitHub, go-bindata }:
2016-10-09 18:25:39 +01:00
buildGoPackage rec {
name = "kops-${version}";
2019-03-15 22:56:53 +00:00
version = "1.11.1";
2016-10-09 18:25:39 +01:00
goPackagePath = "k8s.io/kops";
src = fetchFromGitHub {
2017-05-15 18:54:58 +01:00
rev = version;
2016-10-09 18:25:39 +01:00
owner = "kubernetes";
repo = "kops";
2019-03-15 22:56:53 +00:00
sha256 = "0jia8dhawh786grnbpn64hvsdm6wz5p7hqir01q5xxpd1psnzygj";
2016-10-09 18:25:39 +01:00
};
buildInputs = [go-bindata];
subPackages = ["cmd/kops"];
2017-05-15 18:54:58 +01:00
buildFlagsArray = ''
-ldflags=
-X k8s.io/kops.Version=${version}
-X k8s.io/kops.GitVersion=${version}
'';
2016-10-09 18:25:39 +01:00
preBuild = ''
(cd go/src/k8s.io/kops
2018-05-15 18:19:27 +01:00
go-bindata -o upup/models/bindata.go -pkg models -prefix upup/models/ upup/models/...)
2016-10-09 18:25:39 +01:00
'';
2017-05-23 21:13:23 +01:00
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
'';
2016-10-09 18:25:39 +01:00
meta = with stdenv.lib; {
description = "Easiest way to get a production Kubernetes up and running";
homepage = https://github.com/kubernetes/kops;
license = licenses.asl20;
2017-11-01 20:17:40 +00:00
maintainers = with maintainers; [offline zimbatm];
2017-03-13 02:35:20 +00:00
platforms = platforms.unix;
2016-10-09 18:25:39 +01:00
};
}