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