summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/helm
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2021-10-15 14:13:28 +0200
committerFlorian Klink <flokli@flokli.de>2021-10-17 00:17:17 +0200
commit20c78da41fd1185b521487b0296a8d014a3e0401 (patch)
treec7d21f90e41f39e6cf668489bf9294cd55e27871 /pkgs/applications/networking/cluster/helm
parente435302d702e75682b5bb2907337e00e84add3aa (diff)
downloadnixpkgs-20c78da41fd1185b521487b0296a8d014a3e0401.tar
nixpkgs-20c78da41fd1185b521487b0296a8d014a3e0401.tar.gz
nixpkgs-20c78da41fd1185b521487b0296a8d014a3e0401.tar.bz2
nixpkgs-20c78da41fd1185b521487b0296a8d014a3e0401.tar.lz
nixpkgs-20c78da41fd1185b521487b0296a8d014a3e0401.tar.xz
nixpkgs-20c78da41fd1185b521487b0296a8d014a3e0401.tar.zst
nixpkgs-20c78da41fd1185b521487b0296a8d014a3e0401.zip
kubernetes-helmPlugins.helm-git: init at 0.10.0
This is necessary for running `helm` with a helmfile.yaml containing
git+https URLs.
Diffstat (limited to 'pkgs/applications/networking/cluster/helm')
-rw-r--r--pkgs/applications/networking/cluster/helm/plugins/default.nix8
-rw-r--r--pkgs/applications/networking/cluster/helm/plugins/helm-git.nix46
2 files changed, 51 insertions, 3 deletions
diff --git a/pkgs/applications/networking/cluster/helm/plugins/default.nix b/pkgs/applications/networking/cluster/helm/plugins/default.nix
index edd19a25f9b..342fd9e686a 100644
--- a/pkgs/applications/networking/cluster/helm/plugins/default.nix
+++ b/pkgs/applications/networking/cluster/helm/plugins/default.nix
@@ -2,10 +2,12 @@
 
 {
 
-  helm-diff = callPackage ./helm-diff.nix {};
+  helm-diff = callPackage ./helm-diff.nix { };
 
-  helm-s3 = callPackage ./helm-s3.nix {};
+  helm-git = callPackage ./helm-git.nix { };
 
-  helm-secrets = callPackage ./helm-secrets.nix {};
+  helm-s3 = callPackage ./helm-s3.nix { };
+
+  helm-secrets = callPackage ./helm-secrets.nix { };
 
 }
diff --git a/pkgs/applications/networking/cluster/helm/plugins/helm-git.nix b/pkgs/applications/networking/cluster/helm/plugins/helm-git.nix
new file mode 100644
index 00000000000..05ded10444b
--- /dev/null
+++ b/pkgs/applications/networking/cluster/helm/plugins/helm-git.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, coreutils
+, findutils
+, git
+, gnugrep
+, gnused
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "helm-git";
+  version = "0.10.0";
+
+  src = fetchFromGitHub {
+    owner = "aslafy-z";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0hvycqibmlw2zw3nm8rn73v5x1zcgm2jrfdlljbvc1n4n5vnzdrg";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  # NOTE: helm-git is comprised of shell scripts.
+  dontBuild = true;
+
+  installPhase = ''
+    install -dm755 $out/helm-git
+    install -m644 -Dt $out/helm-git plugin.yaml
+    cp helm-git helm-git-plugin.sh $out/helm-git/
+
+    patchShebangs $out/helm-git/helm-git{,-plugin.sh}
+    wrapProgram $out/helm-git/helm-git \
+        --prefix PATH : ${lib.makeBinPath [ coreutils findutils git gnugrep gnused ]}
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "The Helm downloader plugin that provides GIT protocol support";
+    inherit (src.meta) homepage;
+    license = licenses.mit;
+    maintainers = with maintainers; [ flokli ];
+  };
+}