cue: 0.4.2 -> 0.4.3
This commit is contained in:
parent
ac82180d97
commit
cdea50b39d
|
@ -1,35 +1,51 @@
|
||||||
{ buildGoModule, fetchFromGitHub, lib }:
|
{ buildGoModule, fetchFromGitHub, lib, installShellFiles, testers, cue }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "cue";
|
pname = "cue";
|
||||||
version = "0.4.2";
|
version = "0.4.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "cue-lang";
|
owner = "cue-lang";
|
||||||
repo = "cue";
|
repo = "cue";
|
||||||
rev = "v${version}";
|
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
|
||||||
|
'';
|
||||||
|
|
||||||
checkPhase = "go test ./...";
|
vendorSha256 = "sha256-jTfV8DJlr5LxS3HjOEBkVzBvZKiySrmINumXSUIq2mI=";
|
||||||
|
|
||||||
subPackages = [ "cmd/cue" ];
|
excludedPackages = [ "internal/ci/updatetxtar" "internal/cmd/embedpkg" "internal/cmd/qgo" "pkg/gen" ];
|
||||||
|
|
||||||
ldflags = [
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
"-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;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
$out/bin/cue eval - <<<'a: "all good"' > /dev/null
|
$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";
|
description = "A data constraint language which aims to simplify tasks involving defining and using data";
|
||||||
homepage = "https://cuelang.org/";
|
homepage = "https://cuelang.org/";
|
||||||
maintainers = [];
|
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ aaronjheng ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue