Use patches in the Helm POC

This commit is contained in:
2024-03-21 22:25:22 +01:00
parent 29f9361073
commit 37c49982f5
4 changed files with 37 additions and 4 deletions

View File

@ -4,9 +4,16 @@
, lib ? pkgs.lib
}:
let
mkHelm = { name, version, url, hash ? lib.fakeSha256 }:
mkHelm = {
name,
version,
url,
hash ? lib.fakeSha25,
namespace ? "",
patches ? []
}:
pkgs.stdenv.mkDerivation {
inherit name;
inherit name patches;
src = pkgs.fetchurl {
inherit url hash;
@ -14,13 +21,18 @@ let
phases = [
"unpackPhase"
"patchPhase"
"build"
];
namespace = if namespace != "" then "--namespace ${namespace}" else "";
build = ''
mkdir -p $out
${helm} template ${name} ./ > $out/${name}-${version}.yaml
#${helm} version > $out/README
${helm} template \
--namespace ${namespace} \
${name} ./ > $out/${name}-${version}.yaml
${helm} version > $out/VERSION
'';
};