depot/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

34 lines
895 B
Nix

{ buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "helm-unittest";
version = "0.5.2";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-xA0dA8q7ZDQk35VjyIsJFbm3OlagnIbJ/iz5z2KsxjU=";
};
vendorHash = "sha256-hSnTjEvi1Lexp7wAogqeoXWDCg/bvblw0bt1/lX9iR0=";
# 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 ];
};
}