mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-14 08:53:50 +01:00
move generator jobs into pkgs
This commit is contained in:
parent
7a64a0f599
commit
ef5f5b3c89
6 changed files with 2 additions and 14 deletions
45
pkgs/generators/default.nix
Normal file
45
pkgs/generators/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
}: let
|
||||
generateIstio = import ./istio {
|
||||
inherit
|
||||
pkgs
|
||||
lib
|
||||
;
|
||||
};
|
||||
|
||||
generateK8S = name: spec:
|
||||
import ./k8s {
|
||||
inherit
|
||||
name
|
||||
pkgs
|
||||
lib
|
||||
spec
|
||||
;
|
||||
};
|
||||
in {
|
||||
istio = pkgs.linkFarm "istio-generated" [
|
||||
{
|
||||
name = "latest.nix";
|
||||
path = generateIstio;
|
||||
}
|
||||
];
|
||||
|
||||
k8s = pkgs.linkFarm "k8s-generated" (
|
||||
builtins.attrValues (
|
||||
builtins.mapAttrs (
|
||||
version: sha: let
|
||||
short = builtins.concatStringsSep "." (lib.lists.sublist 0 2 (builtins.splitVersion version));
|
||||
in {
|
||||
name = "v${short}.nix";
|
||||
path = generateK8S "v${short}" (builtins.fetchurl {
|
||||
url = "https://github.com/kubernetes/kubernetes/raw/v${version}/api/openapi-spec/swagger.json";
|
||||
sha256 = sha;
|
||||
});
|
||||
}
|
||||
)
|
||||
(import ../../versions.nix).full
|
||||
)
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue