mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
Merge pull request #299764 from atorres1985-contrib/rename-cue-to-cuelang
cuelang: refactor
This commit is contained in:
commit
c10868c528
@ -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; {
|
11
pkgs/by-name/cu/cue/tests/001-all-good.nix
Normal file
11
pkgs/by-name/cu/cue/tests/001-all-good.nix
Normal 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
|
||||
''
|
@ -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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user