2023-11-19 07:09:40 +00:00
|
|
|
{
|
|
|
|
kubelib,
|
|
|
|
pkgs,
|
|
|
|
}: {
|
2023-11-19 06:01:43 +00:00
|
|
|
remoteYAMLFile = {
|
|
|
|
version,
|
|
|
|
url,
|
|
|
|
hash,
|
|
|
|
}:
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
pname = url;
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = pkgs.fetchurl {inherit url hash;};
|
|
|
|
|
|
|
|
phases = ["installPhase"];
|
|
|
|
installPhase = "cp -v $src $out";
|
|
|
|
};
|
|
|
|
|
2023-11-19 07:09:40 +00:00
|
|
|
helmChart = kubelib.downloadHelmChart;
|
|
|
|
|
2023-11-19 06:01:43 +00:00
|
|
|
gitChart = {
|
|
|
|
name,
|
|
|
|
version,
|
|
|
|
url,
|
|
|
|
chartPath,
|
|
|
|
vPrefixInRef ? false,
|
|
|
|
hash,
|
|
|
|
}:
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
pname = "${url}-${chartPath}";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = pkgs.fetchgit {
|
|
|
|
inherit url hash;
|
|
|
|
rev =
|
|
|
|
if vPrefixInRef
|
|
|
|
then "v${version}"
|
|
|
|
else version;
|
|
|
|
sparseCheckout = [chartPath];
|
|
|
|
};
|
|
|
|
|
|
|
|
phases = ["installPhase"];
|
|
|
|
installPhase = "cp -rv $src/${chartPath} $out";
|
|
|
|
};
|
|
|
|
}
|