cue: init writeCueValidator

This adds `writeCueValidator`, which writes a Cue-validating shell script
(see https://cuelang.org/).
This commit is contained in:
Raito Bezarius 2022-11-30 17:55:09 +01:00 committed by Jörg Thalheim
parent a6dd75809d
commit eca3b89ac2
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,12 @@
{ cue, writeShellScript, lib }:
cueSchemaFile: { document ? null }:
writeShellScript "validate-using-cue"
''${cue}/bin/cue \
--all-errors \
--strict \
vet \
--concrete \
"$1" \
${cueSchemaFile} \
${lib.optionalString (document != null) "-d \"${document}\""}
''

View File

@ -2932,6 +2932,8 @@ with pkgs;
buildGoModule = buildGo118Module; # tests fail with 1.19
};
writeCueValidator = callPackage ../development/tools/cue/validator.nix { };
cuelsp = callPackage ../development/tools/cuelsp {};
cyclone-scheme = callPackage ../development/interpreters/cyclone { };