From 78eb75ea551783052fb45390f020aa4c939a60d7 Mon Sep 17 00:00:00 2001 From: Allen Conlon Date: Sun, 21 Jul 2024 16:09:18 -0400 Subject: [PATCH] kubernetes-helmPlugins.helm-dt: init at 0.4.1 --- maintainers/maintainer-list.nix | 7 +++ .../cluster/helm/plugins/default.nix | 2 + .../cluster/helm/plugins/helm-dt.nix | 48 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 pkgs/applications/networking/cluster/helm/plugins/helm-dt.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 862305f35381..9aab3814e7f6 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1797,6 +1797,13 @@ githubId = 11493130; name = "Asbjørn Olling"; }; + ascii17 = { + name = "Allen Conlon"; + email = "software@conlon.dev"; + github = "a1994sc"; + githubId = 1966320; + keys = [ { fingerprint = "E1F3 9B80 47A5 1EB9 01F8 C385 7FE3 F668 49737 F37"; } ]; + }; asciimoth = { name = "Andrew"; email = "ascii@moth.contact"; diff --git a/pkgs/applications/networking/cluster/helm/plugins/default.nix b/pkgs/applications/networking/cluster/helm/plugins/default.nix index 8ac059e98a24..a1ecfaa07c21 100644 --- a/pkgs/applications/networking/cluster/helm/plugins/default.nix +++ b/pkgs/applications/networking/cluster/helm/plugins/default.nix @@ -5,6 +5,8 @@ helm-diff = callPackage ./helm-diff.nix { }; + helm-dt = callPackage ./helm-dt.nix { }; + helm-git = callPackage ./helm-git.nix { }; helm-mapkubeapis = callPackage ./helm-mapkubeapis.nix { }; diff --git a/pkgs/applications/networking/cluster/helm/plugins/helm-dt.nix b/pkgs/applications/networking/cluster/helm/plugins/helm-dt.nix new file mode 100644 index 000000000000..a3ad03a49344 --- /dev/null +++ b/pkgs/applications/networking/cluster/helm/plugins/helm-dt.nix @@ -0,0 +1,48 @@ +{ + buildGoModule, + fetchFromGitHub, + lib, +}: +buildGoModule rec { + pname = "helm-dt"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = "vmware-labs"; + repo = "distribution-tooling-for-helm"; + rev = "refs/tags/v${version}"; + hash = "sha256-KrQAlB0ORNzKIG2vxych3gVBytTh3Hhnjsyn1ia1ZQM="; + }; + + vendorHash = "sha256-T8Kk+9NAhYOvSq94HOEE53BT7Xh9tU1gJ420o/tiVEo="; + + ldflags = [ + "-s" + "-w" + "-X 'main.BuildDate=1970-01-01 00:00:00 UTC'" + "-X 'main.Commit=v${version}'" + ]; + + # NOTE: Remove the install and upgrade hooks. + postPatch = '' + sed -i '/^hooks:/,+2 d' plugin.yaml + ''; + + # require network/login + doCheck = false; + CGO_ENABLED = 1; + + postInstall = '' + install -dm755 $out/helm-dt/bin + mv $out/bin/dt $out/helm-dt/bin/dt + rmdir $out/bin + install -m644 -Dt $out/helm-dt plugin.yaml + ''; + + meta = { + description = "Helm Distribution plugin is is a set of utilities and Helm Plugin for making offline work with Helm Charts easier"; + homepage = "https://github.com/vmware-labs/distribution-tooling-for-helm"; + maintainers = with lib.maintainers; [ ascii17 ]; + license = lib.licenses.mit; + }; +}