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 04:32:26 +00:00
|
|
|
# Other names I thought of: data, custom, userLib.
|
|
|
|
# Unsure which one will work best.
|
2023-11-30 06:49:58 +00:00
|
|
|
user ? {},
|
2023-12-04 04:32:26 +00:00
|
|
|
} @ inputs: let
|
|
|
|
flakeBuilders = import ./flake-builders.nix inputs;
|
2023-11-30 06:49:58 +00:00
|
|
|
in {
|
|
|
|
mkDerivation = {
|
|
|
|
pname,
|
|
|
|
version,
|
2023-12-04 04:32:26 +00:00
|
|
|
serviceRoot,
|
|
|
|
nsMetadata,
|
2023-11-30 06:49:58 +00:00
|
|
|
kubeVersion,
|
|
|
|
src,
|
2023-12-04 04:32:26 +00:00
|
|
|
}: let
|
|
|
|
services = flakeBuilders.mkServices serviceRoot kubeVersion;
|
|
|
|
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 04:54:47 +00:00
|
|
|
namespace_drv = flakeBuilders.mkNamespaces {
|
|
|
|
inherit (services) namespaces;
|
|
|
|
extraMetadata = nsMetadata;
|
|
|
|
};
|
2023-11-30 06:49:58 +00:00
|
|
|
|
|
|
|
phases = ["installPhase"];
|
2023-12-04 04:54:47 +00:00
|
|
|
installPhase = builtins.readFile ./output.sh;
|
2023-11-30 06:49:58 +00:00
|
|
|
};
|
|
|
|
}
|