diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix b/nixpkgs/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix new file mode 100644 index 000000000000..c5c33573c921 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix @@ -0,0 +1,34 @@ +{ buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "helm-unittest"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + hash = "sha256-8rGYFoBhNPJnsZsRXJ7Z9a/KOV4d2ZIVLSdYCpf3IMs="; + }; + + vendorHash = "sha256-wD4FxJ/+8iw2qAz+s0G/8/PKt7X0MZn+roWtc/wTWmw="; + + # NOTE: Remove the install and upgrade hooks. + postPatch = '' + sed -i '/^hooks:/,+2 d' plugin.yaml + ''; + + postInstall = '' + install -dm755 $out/${pname} + mv $out/bin/helm-unittest $out/${pname}/untt + rmdir $out/bin + install -m644 -Dt $out/${pname} plugin.yaml + ''; + + meta = with lib; { + description = "BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin"; + homepage = "https://github.com/helm-unittest/helm-unittest"; + license = licenses.mit; + maintainers = with maintainers; [ yurrriq ]; + }; +} |