diff options
author | Aaron Jheng <wentworth@outlook.com> | 2022-05-04 08:44:21 +0000 |
---|---|---|
committer | Aaron Jheng <wentworth@outlook.com> | 2022-05-09 14:12:07 +0000 |
commit | cdea50b39d7b989f6cce09be65a7be39a32796e2 (patch) | |
tree | d4df1090d8637085cf0f5f8d7f3f42b9d1477cf5 /pkgs/development/tools/cue | |
parent | ac82180d97398321399400d21018c7a20bd902d5 (diff) |
cue: 0.4.2 -> 0.4.3
Diffstat (limited to 'pkgs/development/tools/cue')
-rw-r--r-- | pkgs/development/tools/cue/default.nix | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/pkgs/development/tools/cue/default.nix b/pkgs/development/tools/cue/default.nix index 21370ab9b5a39..d159a329e539d 100644 --- a/pkgs/development/tools/cue/default.nix +++ b/pkgs/development/tools/cue/default.nix @@ -1,35 +1,51 @@ -{ buildGoModule, fetchFromGitHub, lib }: +{ buildGoModule, fetchFromGitHub, lib, installShellFiles, testers, cue }: buildGoModule rec { pname = "cue"; - version = "0.4.2"; + version = "0.4.3"; src = fetchFromGitHub { owner = "cue-lang"; repo = "cue"; rev = "v${version}"; - sha256 = "sha256-6HD3wcBo21Dep4ckx+oDWAC4nuTvCzlp0bwQxZox2b4="; + sha256 = "sha256-v9MYrijnbtJpTgRZ4hmkaekisOyujldGewCRNbkVzWw="; }; - vendorSha256 = "sha256-tY9iwQW6cB1FgLAmkDNMrvIxR+i4aGYhNs4tepI654o="; + postPatch = '' + # Disable script tests + rm -f cmd/cue/cmd/script_test.go + ''; + + vendorSha256 = "sha256-jTfV8DJlr5LxS3HjOEBkVzBvZKiySrmINumXSUIq2mI="; + + excludedPackages = [ "internal/ci/updatetxtar" "internal/cmd/embedpkg" "internal/cmd/qgo" "pkg/gen" ]; - checkPhase = "go test ./..."; + nativeBuildInputs = [ installShellFiles ]; - subPackages = [ "cmd/cue" ]; + ldflags = [ "-s" "-w" "-X cuelang.org/go/cmd/cue/cmd.version=${version}" ]; - 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 ''; - meta = { + passthru.tests.version = testers.testVersion { + package = cue; + command = "cue version"; + }; + + meta = with lib; { description = "A data constraint language which aims to simplify tasks involving defining and using data"; homepage = "https://cuelang.org/"; - maintainers = []; license = lib.licenses.asl20; + maintainers = with maintainers; [ aaronjheng ]; }; } |