Merge pull request #299764 from atorres1985-contrib/rename-cue-to-cuelang

cuelang: refactor
This commit is contained in:
Weijia Wang 2024-03-30 20:15:12 +01:00 committed by GitHub
commit c10868c528
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 12 deletions

View File

@ -4,6 +4,7 @@
, installShellFiles
, testers
, cue
, callPackage
}:
buildGoModule rec {
@ -26,21 +27,21 @@ buildGoModule rec {
ldflags = [ "-s" "-w" "-X cuelang.org/go/cmd/cue/cmd.version=${version}" ];
postInstall = ''
# Completions
installShellCompletion --cmd cue \
--bash <($out/bin/cue completion bash) \
--fish <($out/bin/cue completion fish) \
--zsh <($out/bin/cue completion zsh)
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/cue eval - <<<'a: "all good"' > /dev/null
'';
passthru.tests.version = testers.testVersion {
package = cue;
command = "cue version";
passthru = {
writeCueValidator = callPackage ./validator.nix { };
tests = {
test-001-all-good = callPackage ./tests/001-all-good.nix { };
version = testers.testVersion {
package = cue;
command = "cue version";
};
};
};
meta = with lib; {

View File

@ -0,0 +1,11 @@
{ lib
, cue
, runCommand
}:
runCommand "cue-test-001-all-good-${cue.version}" {
nativeBuildInputs = [ cue ];
meta.timeout = 10;
} ''
cue eval - <<<'a: "all good"' > $out
''

View File

@ -3678,9 +3678,7 @@ with pkgs;
cudd = callPackage ../development/libraries/cudd { };
cue = callPackage ../development/tools/cue { };
writeCueValidator = callPackage ../development/tools/cue/validator.nix { };
inherit (cue) writeCueValidator;
cuelsp = callPackage ../development/tools/cuelsp { };