Use patches in the Helm POC
This commit is contained in:
@ -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
|
||||
'';
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user