a3f556a323
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/helm/versions. These checks were done: - built on NixOS - /nix/store/clpdnyjaysh2i2h1xjilxryzzb5ywp7y-helm-2.9.1/bin/helm passed the binary check. - 1 of 1 passed binary check by having a zero exit code. - 0 of 1 passed binary check by having the new version present in output. - found 2.9.1 with grep in /nix/store/clpdnyjaysh2i2h1xjilxryzzb5ywp7y-helm-2.9.1 - directory tree listing: https://gist.github.com/ed779ecaf62619059b08a121472e6a96 - du listing: https://gist.github.com/2621c9acfcbf3fa34c093d8bbd9d0292
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{ stdenv, fetchurl, kubectl }:
|
|
let
|
|
isLinux = stdenv.isLinux;
|
|
arch = if isLinux
|
|
then "linux-amd64"
|
|
else "darwin-amd64";
|
|
checksum = if isLinux
|
|
then "1fk6w6sajdi6iphxrzi9r7xfyaf923nxcqnl01s6x3f611fjvbjn"
|
|
else "1jzgy641hm3khj0bakfbr5wd5zl3s7w5jb622fjv2jxwmnv7dxiv";
|
|
pname = "helm";
|
|
version = "2.9.1";
|
|
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;
|
|
};
|
|
}
|