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

46 lines
1.3 KiB
Nix
Raw Normal View History

2016-10-09 18:25:39 +01:00
{ stdenv, lib, buildGoPackage, fetchFromGitHub, go-bindata }:
buildGoPackage rec {
name = "kops-${version}";
version = "1.8.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";
sha256 = "12nyr0iw1xwp60apli3nlq2vyn4jk3qjrb404m2syx2mqbnn47my";
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
2017-05-15 18:54:58 +01: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 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
};
}