35 lines
895 B
Nix
35 lines
895 B
Nix
{ buildGoModule, fetchFromGitHub, lib }:
|
|
|
|
buildGoModule rec {
|
|
pname = "helm-unittest";
|
|
version = "0.4.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-C1aHnKNXgzlPT1qMngRcPZ6hYUOenU1xpeYLnhrvtnc=";
|
|
};
|
|
|
|
vendorHash = "sha256-nm1LFy2yqfQs+HmrAR1EsBjpm9w0u4einLbVFW1UitI=";
|
|
|
|
# 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 ];
|
|
};
|
|
}
|