kubernetes-helm: 2.15.1 -> 3.0.0

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
Sascha Grunert 2019-11-13 17:07:05 +01:00 committed by Jon
parent de121909d2
commit 65e7d9c8c9
2 changed files with 8 additions and 1222 deletions

View File

@ -1,48 +1,25 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub }:
buildGoPackage rec {
version = "2.15.1";
buildGoModule rec {
pname = "helm";
version = "3.0.0";
src = fetchFromGitHub {
owner = "helm";
repo = "helm";
rev = "v${version}";
sha256 = "1afbymgpax7kgjjv1c9xb4dm7gcrhn2g69piamdq1k0ng348k5w0";
sha256 = "0gx5gmj1470q3gj8v043dmm31skf83p1ckzdcfzx8wdjlglsljrj";
};
modSha256 = "0xjzzwmq3i77anb7w2qfnz7vc0gxq02lylj0xs6dzwl543winshm";
goPackagePath = "k8s.io/helm";
subPackages = [ "cmd/helm" "cmd/tiller" "cmd/rudder" ];
goDeps = ./deps.nix;
# Thsese are the original flags from the helm makefile
buildFlagsArray = ''
-ldflags=-X k8s.io/helm/pkg/version.Version=v${version} -X k8s.io/helm/pkg/version.GitTreeState=clean -X k8s.io/helm/pkg/version.BuildMetadata=
-w
-s
'';
preBuild = ''
# This is a hack(?) to flatten the dependency tree the same way glide or dep would
# Otherwise you'll get errors like
# have DeepCopyObject() "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime".Object
# want DeepCopyObject() "k8s.io/apimachinery/pkg/runtime".Object
rm -rf $NIX_BUILD_TOP/go/src/k8s.io/kubernetes/vendor
rm -rf $NIX_BUILD_TOP/go/src/k8s.io/apiextensions-apiserver/vendor
'';
postInstall = ''
mkdir -p $bin/share/bash-completion/completions
mkdir -p $bin/share/zsh/site-functions
$bin/bin/helm completion bash > $bin/share/bash-completion/completions/helm
$bin/bin/helm completion zsh > $bin/share/zsh/site-functions/_helm
'';
subPackages = [ "cmd/helm" ];
buildFlagsArray = [ "-ldflags=-w -s -X helm.sh/helm/v3/internal/version.gitCommit=v${version}" ];
meta = with stdenv.lib; {
homepage = https://github.com/kubernetes/helm;
description = "A package manager for kubernetes";
license = licenses.asl20;
maintainers = [ maintainers.rlupton20 maintainers.edude03 ];
maintainers = with maintainers; [ rlupton20 edude03 saschagrunert ];
};
}

File diff suppressed because it is too large Load Diff