mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
cue: init writeCueValidator
This adds `writeCueValidator`, which writes a Cue-validating shell script (see https://cuelang.org/).
This commit is contained in:
parent
a6dd75809d
commit
eca3b89ac2
12
pkgs/development/tools/cue/validator.nix
Normal file
12
pkgs/development/tools/cue/validator.nix
Normal 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}\""}
|
||||
''
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user