blob: ec5a4eb4f35e93931fddf5a368e8d87a72a4f0e4 (
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
|
{ buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "helm-diff";
version = "3.8.1";
src = fetchFromGitHub {
owner = "databus23";
repo = pname;
rev = "v${version}";
sha256 = "sha256-x3tTHiuw0CtvsOCB7oPd9EB+B5T1m6Hn7O1CriYahuA=";
};
vendorHash = "sha256-2tiBFS3gvSbnyighSorg/ar058ZJmiQviaT13zOS8KA=";
ldflags = [ "-s" "-w" "-X github.com/databus23/helm-diff/v3/cmd.Version=${version}" ];
# NOTE: Remove the install and upgrade hooks.
postPatch = ''
sed -i '/^hooks:/,+2 d' plugin.yaml
'';
postInstall = ''
install -dm755 $out/${pname}
mv $out/bin $out/${pname}/
mv $out/${pname}/bin/{helm-,}diff
install -m644 -Dt $out/${pname} plugin.yaml
'';
meta = with lib; {
description = "A Helm plugin that shows a diff";
homepage = "https://github.com/databus23/helm-diff";
license = licenses.asl20;
maintainers = with maintainers; [ yurrriq ];
};
}
|