Skip to content

Commit

Permalink
kubernetes-helmPlugins.helm-git: init at 0.10.0
Browse files Browse the repository at this point in the history
This is necessary for running `helm` with a helmfile.yaml containing
git+https URLs.
  • Loading branch information
flokli committed Oct 15, 2021
1 parent e435302 commit 126f977
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkgs/applications/networking/cluster/helm/plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };

}
46 changes: 46 additions & 0 deletions pkgs/applications/networking/cluster/helm/plugins/helm-git.nix
Original file line number Diff line number Diff line change
@@ -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/${pname}
install -m644 -Dt $out/${pname} plugin.yaml
cp helm-git helm-git-plugin.sh $out/${pname}/
patchShebangs $out/${pname}/helm-git{,-plugin.sh}
wrapProgram $out/${pname}/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 ];
};
}

0 comments on commit 126f977

Please sign in to comment.