1
0
Fork 0
mirror of https://git.sr.ht/~goorzhel/turboprop synced 2024-12-14 11:37:37 +00:00
turboprop/default.nix
Antonio Gurgel 7c0b843315 Move kubeV to loader; allow user to set apiV
It doesn't make sense for `kubeVersions` to be an _input_ to the module,
i.e., one provided by the Haumea loader. Let it be passed inside the
foldler instead, like `apiVersions`.

En passant, I realized it's as easy to expose apiVersions to user input;
maybe one'd want to specify APIs not installed by this flake.
2023-12-04 19:34:22 -08:00

33 lines
704 B
Nix

{
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;
};
}