Files
vms/nix/validate.nix
T
2024-07-13 03:03:14 -05:00

22 lines
394 B
Nix

{
writeShellApplication,
findutils,
packer,
...
}:
writeShellApplication {
name = "validate";
runtimeInputs = [
findutils
packer
];
text = ''
shopt -s globstar
find "${PACKER_CONFIG_DIR}" -name '*_linux_amd64' -exec chmod +x '{}' ";"
packer init sources
for vars in distros/**/*.pkrvars.hcl; do
packer validate -except=upload "-var-file=''${vars}" sources/
done
'';
}