1{
2 buildGoModule,
3 fetchFromGitHub,
4 lib,
5}:
6
7buildGoModule rec {
8 pname = "helm-mapkubeapis";
9 version = "0.6.1";
10
11 src = fetchFromGitHub {
12 owner = "helm";
13 repo = "helm-mapkubeapis";
14 rev = "v${version}";
15 hash = "sha256-RvyoqfhvoXESmc6M4B1XeUtal0zQt6LCKjByyBe6pUU=";
16 };
17
18 vendorHash = "sha256-ZnfNje0JuTCckW9SMc2TLb968nHiGK/bgOJnIllJJq4=";
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/helm-mapkubeapis
27 mv $out/bin $out/helm-mapkubeapis/
28 install -m644 -Dt $out/helm-mapkubeapis/config/ config/Map.yaml
29 install -m644 -Dt $out/helm-mapkubeapis plugin.yaml
30 '';
31
32 meta = {
33 description = "Helm plugin which maps deprecated or removed Kubernetes APIs in a release to supported APIs";
34 homepage = "https://github.com/helm/helm-mapkubeapis";
35 license = with lib.licenses; [ asl20 ];
36 maintainers = with lib.maintainers; [ aos ];
37 };
38}