2023-11-30 06:49:58 +00:00
|
|
|
{
|
|
|
|
charts,
|
2023-12-04 03:53:14 +00:00
|
|
|
haumea,
|
2023-11-30 06:49:58 +00:00
|
|
|
lib,
|
|
|
|
pkgs,
|
2023-12-04 05:36:54 +00:00
|
|
|
user,
|
2023-12-04 04:32:26 +00:00
|
|
|
} @ inputs: let
|
2023-12-04 08:00:37 +00:00
|
|
|
mk = import src/mk.nix inputs;
|
2023-11-30 06:49:58 +00:00
|
|
|
in {
|
|
|
|
mkDerivation = {
|
|
|
|
pname,
|
|
|
|
version,
|
|
|
|
src,
|
2023-12-04 06:39:09 +00:00
|
|
|
serviceRoot,
|
|
|
|
nsMetadata ? {},
|
|
|
|
kubeVersion ? pkgs.kubernetes.version,
|
2023-12-05 03:39:28 +00:00
|
|
|
apiVersions ? [],
|
2023-12-04 04:32:26 +00:00
|
|
|
}: let
|
2023-12-05 03:34:22 +00:00
|
|
|
services = mk.services {inherit serviceRoot kubeVersion apiVersions;};
|
2023-12-04 04:32:26 +00:00
|
|
|
in
|
2023-11-30 06:49:58 +00:00
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
inherit pname version src;
|
2023-12-04 04:32:26 +00:00
|
|
|
derivation_paths = services.paths;
|
2023-12-04 08:00:37 +00:00
|
|
|
namespace_drv = mk.namespaces {
|
2023-12-04 04:54:47 +00:00
|
|
|
inherit (services) namespaces;
|
|
|
|
extraMetadata = nsMetadata;
|
|
|
|
};
|
2023-11-30 06:49:58 +00:00
|
|
|
|
2023-12-04 05:05:15 +00:00
|
|
|
buildInputs = [pkgs.kustomize];
|
2023-11-30 06:49:58 +00:00
|
|
|
phases = ["installPhase"];
|
2023-12-04 05:36:54 +00:00
|
|
|
installPhase = builtins.readFile src/output.sh;
|
2023-11-30 06:49:58 +00:00
|
|
|
};
|
|
|
|
}
|