Adding a POC around helm
This commit is contained in:
31
helm-poc/nix/helm.nix
Normal file
31
helm-poc/nix/helm.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> {}
|
||||
, helm ? "${pkgs.kubernetes-helm}/bin/helm"
|
||||
, lib ? pkgs.lib
|
||||
}:
|
||||
let
|
||||
mkHelm = { name, version, url, hash ? lib.fakeSha256 }:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
inherit name;
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
inherit url hash;
|
||||
};
|
||||
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
"build"
|
||||
];
|
||||
|
||||
build = ''
|
||||
mkdir -p $out
|
||||
${helm} template ${name} ./ > $out/${name}-${version}.yaml
|
||||
#${helm} version > $out/README
|
||||
'';
|
||||
};
|
||||
|
||||
nixHelm = {
|
||||
inherit mkHelm;
|
||||
};
|
||||
in
|
||||
nixHelm
|
Reference in New Issue
Block a user