forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubernetes-helmPlugins.helm-git: init at 0.10.0
This is necessary for running `helm` with a helmfile.yaml containing git+https URLs.
- Loading branch information
Showing
2 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
pkgs/applications/networking/cluster/helm/plugins/helm-git.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ]; | ||
}; | ||
} |