Adding an extend example (helm+oci)
This commit is contained in:
14
poc-helm-oci/default.nix
Normal file
14
poc-helm-oci/default.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> {}
|
||||
, lib ? pkgs.lib
|
||||
, extend ? pkgs.extend
|
||||
}:
|
||||
let
|
||||
extendedAttrs = extend (final: prev: {
|
||||
localOutputs = {
|
||||
manifests = final.callPackage ./packages/manifests {};
|
||||
oci-image = final.callPackage ./packages/oci-image {};
|
||||
};
|
||||
});
|
||||
in
|
||||
extendedAttrs.localOutputs
|
20
poc-helm-oci/packages/manifests/default.nix
Normal file
20
poc-helm-oci/packages/manifests/default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
pkgs
|
||||
, lib
|
||||
, helmnix ? import ../../../helm-poc/nix/helm.nix {}
|
||||
}:
|
||||
helmnix.mkHelm rec {
|
||||
name = "cert-manager";
|
||||
version = "v1.14.4";
|
||||
url = "https://charts.jetstack.io/charts/${name}-${version}.tgz";
|
||||
hash = "sha256-V3X9vBiB1uUQ33bTh1OvVLhr0Uyqjtso/bt5UnBC3t4=";
|
||||
values = ./../../values/cert-manager.yaml;
|
||||
}
|
||||
|
||||
#pkgs.dockerTools.streamLayeredImage {
|
||||
# name = "oci-image";
|
||||
# includeStorePaths = false;
|
||||
# fakeRootCommands = ''
|
||||
# cp -Lr ${localOutputs.charts}/* .
|
||||
# rm -fr nix
|
||||
# '';
|
18
poc-helm-oci/packages/oci-image/default.nix
Normal file
18
poc-helm-oci/packages/oci-image/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
localOutputs,
|
||||
}:
|
||||
pkgs.dockerTools.streamLayeredImage {
|
||||
name = "oci-image";
|
||||
includeStorePaths = false;
|
||||
fakeRootCommands = ''
|
||||
cp -Lr ${localOutputs.manifests}/* .
|
||||
rm -fr nix
|
||||
'';
|
||||
|
||||
# config.Entrypoint = ["${lib.getExe localOutputs.binaries.simple-package}"];
|
||||
# contents = [
|
||||
# pkgs.hello
|
||||
# ];
|
||||
}
|
1
poc-helm-oci/values/cert-manager.yaml
Normal file
1
poc-helm-oci/values/cert-manager.yaml
Normal file
@ -0,0 +1 @@
|
||||
namespace: testaroo
|
Reference in New Issue
Block a user