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

46 lines
1.3 KiB
Nix
Raw Normal View History

2016-10-09 19:25:39 +02:00
{ stdenv, lib, buildGoPackage, fetchFromGitHub, go-bindata }:
buildGoPackage rec {
name = "kops-${version}";
2017-11-01 21:17:40 +01:00
version = "1.7.1";
2016-10-09 19:25:39 +02:00
goPackagePath = "k8s.io/kops";
src = fetchFromGitHub {
2017-05-15 19:54:58 +02:00
rev = version;
2016-10-09 19:25:39 +02:00
owner = "kubernetes";
repo = "kops";
2017-11-01 21:17:40 +01:00
sha256 = "0wii6w6hs9hjz3vvgqwa5ilwdi8a3qknmqsg3izazmgmnhl712wd";
2016-10-09 19:25:39 +02:00
};
buildInputs = [go-bindata];
subPackages = ["cmd/kops"];
2017-05-15 19:54:58 +02:00
buildFlagsArray = ''
-ldflags=
-X k8s.io/kops.Version=${version}
-X k8s.io/kops.GitVersion=${version}
'';
2016-10-09 19:25:39 +02:00
preBuild = ''
(cd go/src/k8s.io/kops
2017-05-15 19:54:58 +02:00
go-bindata -o upup/models/bindata.go -pkg models -prefix upup/models/ upup/models/...
go-bindata -o federation/model/bindata.go -pkg model -prefix federation/model federation/model/...)
2016-10-09 19:25:39 +02:00
'';
2017-05-23 22:13:23 +02: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 19:25:39 +02: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 21:17:40 +01:00
maintainers = with maintainers; [offline zimbatm];
2017-03-13 03:35:20 +01:00
platforms = platforms.unix;
2016-10-09 19:25:39 +02:00
};
}