Merge pull request #215752 from stehessel/helm-fix-darwin-build
kubernetes-helm: fix darwin build
This commit is contained in:
commit
cf16690d1d
1 changed files with 10 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kubernetes-helm }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "kubernetes-helm";
|
pname = "kubernetes-helm";
|
||||||
|
@ -20,12 +20,13 @@ buildGoModule rec {
|
||||||
"-X helm.sh/helm/v3/internal/version.gitCommit=${src.rev}"
|
"-X helm.sh/helm/v3/internal/version.gitCommit=${src.rev}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
# skipping version tests because they require dot git directory
|
# skipping version tests because they require dot git directory
|
||||||
substituteInPlace cmd/helm/version_test.go \
|
substituteInPlace cmd/helm/version_test.go \
|
||||||
--replace "TestVersion" "SkipVersion"
|
--replace "TestVersion" "SkipVersion"
|
||||||
'' + lib.optionalString stdenv.isLinux ''
|
# skipping plugin tests
|
||||||
# skipping plugin tests on linux
|
|
||||||
substituteInPlace cmd/helm/plugin_test.go \
|
substituteInPlace cmd/helm/plugin_test.go \
|
||||||
--replace "TestPluginDynamicCompletion" "SkipPluginDynamicCompletion" \
|
--replace "TestPluginDynamicCompletion" "SkipPluginDynamicCompletion" \
|
||||||
--replace "TestLoadPlugins" "SkipLoadPlugins"
|
--replace "TestLoadPlugins" "SkipLoadPlugins"
|
||||||
|
@ -41,6 +42,12 @@ buildGoModule rec {
|
||||||
installShellCompletion helm.{bash,zsh,fish}
|
installShellCompletion helm.{bash,zsh,fish}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests.version = testers.testVersion {
|
||||||
|
package = kubernetes-helm;
|
||||||
|
command = "helm version";
|
||||||
|
version = "v${version}";
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/kubernetes/helm";
|
homepage = "https://github.com/kubernetes/helm";
|
||||||
description = "A package manager for kubernetes";
|
description = "A package manager for kubernetes";
|
||||||
|
|
Loading…
Reference in a new issue