mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 01:33:10 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{ buildGoModule
|
|
, fetchFromGitHub
|
|
, lib
|
|
, installShellFiles
|
|
, testers
|
|
, cue
|
|
, callPackage
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "cue";
|
|
version = "0.8.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cue-lang";
|
|
repo = "cue";
|
|
rev = "v${version}";
|
|
hash = "sha256-GU1PG5ciUqbRlAveq2ouqnBYIBEdMSSM0H/1eHL+zlo=";
|
|
};
|
|
|
|
vendorHash = "sha256-0OZtKIDdEnQLnSj109EpGvaZvMIy7gPAZ+weHzYKGSg=";
|
|
|
|
subPackages = [ "cmd/*" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd cue \
|
|
--bash <($out/bin/cue completion bash) \
|
|
--fish <($out/bin/cue completion fish) \
|
|
--zsh <($out/bin/cue completion zsh)
|
|
'';
|
|
|
|
passthru = {
|
|
writeCueValidator = callPackage ./validator.nix { };
|
|
tests = {
|
|
test-001-all-good = callPackage ./tests/001-all-good.nix { };
|
|
version = testers.testVersion {
|
|
package = cue;
|
|
command = "cue version";
|
|
version = "v${version}";
|
|
};
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Data constraint language which aims to simplify tasks involving defining and using data";
|
|
homepage = "https://cuelang.org/";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with maintainers; [ aaronjheng ];
|
|
mainProgram = "cue";
|
|
};
|
|
}
|