2022-04-13 18:12:54 +00:00
|
|
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2018-10-09 05:28:50 +00:00
|
|
|
|
2022-02-04 12:16:47 +00:00
|
|
|
buildGoModule rec {
|
2022-04-13 18:12:54 +00:00
|
|
|
pname = "kubernetes-helm";
|
2022-08-14 12:06:47 +00:00
|
|
|
version = "3.9.3";
|
2016-12-12 23:43:24 +00:00
|
|
|
|
2018-10-09 05:28:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "helm";
|
|
|
|
repo = "helm";
|
|
|
|
rev = "v${version}";
|
2022-08-14 12:06:47 +00:00
|
|
|
sha256 = "sha256-fRlHI2g+pSexPzeEqUnow5WTPvNMGnQNWjnllzJ42fY=";
|
2016-12-12 23:43:24 +00:00
|
|
|
};
|
2022-08-14 12:06:47 +00:00
|
|
|
vendorSha256 = "sha256-ZOY25wgxCdVQafdhBW4Z3aQxOGTs7N3SvSDJ/Fu5psg=";
|
2020-08-04 00:26:27 +00:00
|
|
|
|
2019-11-13 16:07:05 +00:00
|
|
|
subPackages = [ "cmd/helm" ];
|
2021-06-30 01:52:45 +00:00
|
|
|
ldflags = [
|
2022-01-26 11:29:56 +00:00
|
|
|
"-w"
|
|
|
|
"-s"
|
2021-06-30 01:52:45 +00:00
|
|
|
"-X helm.sh/helm/v3/internal/version.version=v${version}"
|
2022-08-16 05:40:50 +00:00
|
|
|
"-X helm.sh/helm/v3/internal/version.gitCommit=${src.rev}"
|
2021-06-30 01:52:45 +00:00
|
|
|
];
|
2016-12-12 23:43:24 +00:00
|
|
|
|
2022-04-13 18:12:54 +00:00
|
|
|
preCheck = ''
|
|
|
|
# skipping version tests because they require dot git directory
|
|
|
|
substituteInPlace cmd/helm/version_test.go \
|
|
|
|
--replace "TestVersion" "SkipVersion"
|
|
|
|
'' + lib.optionalString stdenv.isLinux ''
|
|
|
|
# skipping plugin tests on linux
|
|
|
|
substituteInPlace cmd/helm/plugin_test.go \
|
|
|
|
--replace "TestPluginDynamicCompletion" "SkipPluginDynamicCompletion" \
|
|
|
|
--replace "TestLoadPlugins" "SkipLoadPlugins"
|
|
|
|
substituteInPlace cmd/helm/helm_test.go \
|
|
|
|
--replace "TestPluginExitCode" "SkipPluginExitCode"
|
|
|
|
'';
|
|
|
|
|
2019-12-13 21:37:30 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
$out/bin/helm completion bash > helm.bash
|
|
|
|
$out/bin/helm completion zsh > helm.zsh
|
|
|
|
installShellCompletion helm.{bash,zsh}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/kubernetes/helm";
|
2016-12-12 23:43:24 +00:00
|
|
|
description = "A package manager for kubernetes";
|
2022-04-13 18:12:54 +00:00
|
|
|
mainProgram = "helm";
|
2016-12-12 23:43:24 +00:00
|
|
|
license = licenses.asl20;
|
2022-04-13 18:12:54 +00:00
|
|
|
maintainers = with maintainers; [ rlupton20 edude03 saschagrunert Frostman Chili-Man techknowlogick ];
|
2016-12-12 23:43:24 +00:00
|
|
|
};
|
2020-05-18 15:28:45 +00:00
|
|
|
}
|