1{
2 buildGoModule,
3 fetchFromGitHub,
4 lib,
5}:
6
7buildGoModule rec {
8 pname = "helm-unittest";
9 version = "0.7.2";
10
11 src = fetchFromGitHub {
12 owner = pname;
13 repo = pname;
14 rev = "v${version}";
15 hash = "sha256-RWucFZlyVYV5pHFGP7x5I+SILAJ9k12R7l5o7WKGS/c=";
16 };
17
18 vendorHash = "sha256-tTM9n/ahtAJoQt0fwf1jrSokWER+cOnpPX7NTNrhKc4=";
19
20 # NOTE: Remove the install and upgrade hooks.
21 postPatch = ''
22 sed -i '/^hooks:/,+2 d' plugin.yaml
23 '';
24
25 postInstall = ''
26 install -dm755 $out/${pname}
27 mv $out/bin/helm-unittest $out/${pname}/untt
28 rmdir $out/bin
29 install -m644 -Dt $out/${pname} plugin.yaml
30 '';
31
32 meta = with lib; {
33 description = "BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin";
34 homepage = "https://github.com/helm-unittest/helm-unittest";
35 license = licenses.mit;
36 maintainers = with maintainers; [ yurrriq ];
37 };
38}