2023-11-19 07:09:40 +00:00
|
|
|
{
|
|
|
|
kubelib,
|
|
|
|
pkgs,
|
|
|
|
}: {
|
2023-11-19 06:01:43 +00:00
|
|
|
remoteYAMLFile = {
|
|
|
|
version,
|
|
|
|
url,
|
|
|
|
hash,
|
2023-12-06 07:50:18 +00:00
|
|
|
...
|
2023-11-19 06:01:43 +00:00
|
|
|
}:
|
|
|
|
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,
|
2023-11-19 19:46:27 +00:00
|
|
|
hash,
|
2023-11-19 06:01:43 +00:00
|
|
|
chartPath,
|
|
|
|
vPrefixInRef ? false,
|
2023-12-06 07:50:18 +00:00
|
|
|
...
|
2023-11-19 06:01:43 +00:00
|
|
|
}:
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|