1
0
Fork 0
mirror of https://git.sr.ht/~goorzhel/turboprop synced 2024-12-14 11:37:37 +00:00
turboprop/default.nix
2023-12-03 23:03:36 -08:00

32 lines
688 B
Nix

{
charts,
haumea,
lib,
pkgs,
user,
} @ inputs: let
builders = import src/builders.nix inputs;
in {
mkDerivation = {
pname,
version,
src,
serviceRoot,
nsMetadata ? {},
kubeVersion ? pkgs.kubernetes.version,
}: let
services = builders.mkServices serviceRoot kubeVersion;
in
pkgs.stdenv.mkDerivation {
inherit pname version src;
derivation_paths = services.paths;
namespace_drv = builders.mkNamespaces {
inherit (services) namespaces;
extraMetadata = nsMetadata;
};
buildInputs = [pkgs.kustomize];
phases = ["installPhase"];
installPhase = builtins.readFile src/output.sh;
};
}