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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.6 KiB
Nix
Raw Normal View History

2022-04-13 18:12:54 +00:00
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2018-10-09 05:28:50 +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";
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=";
};
2022-08-14 12:06:47 +00:00
vendorSha256 = "sha256-ZOY25wgxCdVQafdhBW4Z3aQxOGTs7N3SvSDJ/Fu5psg=";
subPackages = [ "cmd/helm" ];
ldflags = [
"-w"
"-s"
"-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}"
];
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}
'';
meta = with lib; {
homepage = "https://github.com/kubernetes/helm";
description = "A package manager for kubernetes";
2022-04-13 18:12:54 +00:00
mainProgram = "helm";
license = licenses.asl20;
2022-04-13 18:12:54 +00:00
maintainers = with maintainers; [ rlupton20 edude03 saschagrunert Frostman Chili-Man techknowlogick ];
};
2020-05-18 15:28:45 +00:00
}