Last active
January 25, 2026 02:06
-
-
Save maxsei/b742916bc989928313ee043b7d8587e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| klib = nixidy.inputs.nix-kube-generators.lib { inherit pkgs; }; | |
| find-crds = | |
| chart: | |
| let | |
| crd-filepath-file = | |
| pkgs.runCommand "find-crds" | |
| { | |
| nativeBuildInputs = with pkgs; [ | |
| ripgrep | |
| yq | |
| ]; | |
| } | |
| '' | |
| touch $out | |
| rg -g '**/*.yaml' -g '**/*.yml' 'kind: CustomResourceDefinition' -l ${chart} | while read file; do | |
| realpath --relative-to=${chart} $file >> $out | |
| done | |
| ''; | |
| crd-filepath-file-contents = builtins.readFile crd-filepath-file; | |
| crd-filepaths = pkgs.lib.splitString "\n" crd-filepath-file-contents; | |
| in | |
| builtins.filter (s: s != "") crd-filepaths; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment