blob: a5a2f7566b46f77488c476eec65074a24ad48163 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "helm-cm-push";
version = "0.10.4";
src = fetchFromGitHub {
owner = "chartmuseum";
repo = "helm-push";
rev = "v${version}";
hash = "sha256-YnhI1/BDk9swr3YFm5ajGf4LLgPty7blA2tlsMH0erY=";
};
vendorHash = "sha256-7bUDKqkvBV1Upcrj4DQnVCP74QtKlSwF0Kl2sPFZpjc=";
subPackage = [ "cmd/helm-cm-push" ];
# Remove hooks.
postPatch = ''
sed -e '/^hooks:/,+2 d' -i plugin.yaml
'';
CGO_ENABLED = 0;
ldflags = [ "-s" "-w" ];
postInstall = ''
install -Dm644 plugin.yaml $out/helm-cm-push/plugin.yaml
mv $out/bin $out/helm-cm-push
'';
# Tests require the ChartMuseum service.
doCheck = false;
meta = with lib; {
description = "Helm plugin to push chart package to ChartMuseum";
homepage = "https://github.com/chartmuseum/helm-push";
license = licenses.asl20;
maintainers = with maintainers; [ azahi ];
};
}
|