about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/helm
diff options
context:
space:
mode:
authorStephan Heßelmann <shesselm@redhat.com>2023-02-11 01:05:53 +0100
committerStephan Heßelmann <shesselm@redhat.com>2023-02-11 01:11:45 +0100
commit5dd8bf8146d12fd0f0b39bf3481a65742bfb8d1b (patch)
tree3cacf8fcfbf6c827dd9f16a4aa0895e895231a99 /pkgs/applications/networking/cluster/helm
parent6fe0b2308609dfcb5eea9c0aa287917ca6838bfe (diff)
kubernetes-helm: fix darwin build
Diffstat (limited to 'pkgs/applications/networking/cluster/helm')
-rw-r--r--pkgs/applications/networking/cluster/helm/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/applications/networking/cluster/helm/default.nix b/pkgs/applications/networking/cluster/helm/default.nix
index 3537b2b9515b4..12868dcc5afcc 100644
--- a/pkgs/applications/networking/cluster/helm/default.nix
+++ b/pkgs/applications/networking/cluster/helm/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, kubernetes-helm }:
 
 buildGoModule rec {
   pname = "kubernetes-helm";
@@ -20,12 +20,13 @@ buildGoModule rec {
     "-X helm.sh/helm/v3/internal/version.gitCommit=${src.rev}"
   ];
 
+  __darwinAllowLocalNetworking = true;
+
   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
+    # skipping plugin tests
     substituteInPlace cmd/helm/plugin_test.go \
       --replace "TestPluginDynamicCompletion" "SkipPluginDynamicCompletion" \
       --replace "TestLoadPlugins" "SkipLoadPlugins"
@@ -41,6 +42,12 @@ buildGoModule rec {
     installShellCompletion helm.{bash,zsh,fish}
   '';
 
+  passthru.tests.version = testers.testVersion {
+    package = kubernetes-helm;
+    command = "helm version";
+    version = "v${version}";
+  };
+
   meta = with lib; {
     homepage = "https://github.com/kubernetes/helm";
     description = "A package manager for kubernetes";