blob: 72ab44e1934a4e0ecc67eaf77294799b73c388e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{ stdenv, fetchurl, kubectl }:
let
isLinux = stdenv.isLinux;
arch = if isLinux
then "linux-amd64"
else "darwin-amd64";
checksum = if isLinux
then "18bk4zqdxdrdcl34qay5mpzzywy9srmpz3mm91l0za6nhqapb902"
else "03xb73769awc6dpvz86nqm9fbgp3yrw30kf5lphf76klk2ii66sm";
pname = "helm";
version = "2.11.0";
in
stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
url = "https://kubernetes-helm.storage.googleapis.com/helm-v${version}-${arch}.tar.gz";
sha256 = checksum;
};
preferLocalBuild = true;
buildInputs = [ ];
propagatedBuildInputs = [ kubectl ];
phases = [ "buildPhase" "installPhase" ];
buildPhase = ''
mkdir -p $out/bin
'';
installPhase = ''
tar -xvzf $src
cp ${arch}/helm $out/bin/${pname}
chmod +x $out/bin/${pname}
mkdir -p $out/share/bash-completion/completions
mkdir -p $out/share/zsh/site-functions
$out/bin/helm completion bash > $out/share/bash-completion/completions/helm
$out/bin/helm completion zsh > $out/share/zsh/site-functions/_helm
'';
meta = with stdenv.lib; {
homepage = https://github.com/kubernetes/helm;
description = "A package manager for kubernetes";
license = licenses.asl20;
maintainers = [ maintainers.rlupton20 ];
platforms = [ "x86_64-linux" ] ++ platforms.darwin;
};
}
|