2024-09-28 13:02:59 +00:00
|
|
|
{
|
|
|
|
buildGoModule,
|
|
|
|
lib,
|
|
|
|
installShellFiles,
|
|
|
|
fetchFromGitHub,
|
2024-09-28 13:08:02 +00:00
|
|
|
nix-update-script,
|
2024-09-28 13:02:59 +00:00
|
|
|
}:
|
2023-09-28 03:11:51 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
2023-06-09 13:04:50 +00:00
|
|
|
pname = "deck";
|
2024-09-28 13:20:37 +00:00
|
|
|
version = "1.40.3";
|
2023-06-09 13:04:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Kong";
|
|
|
|
repo = "deck";
|
2024-09-28 13:08:02 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-28 13:20:37 +00:00
|
|
|
hash = "sha256-n6WASCtDwBX4FASSWI17JpU7rDXIeSidPWhj/MB2tUs=";
|
2023-06-09 13:04:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s -w -X github.com/kong/deck/cmd.VERSION=${version}"
|
2023-09-28 03:11:51 +00:00
|
|
|
"-X github.com/kong/deck/cmd.COMMIT=${src.rev}"
|
2023-06-09 13:04:50 +00:00
|
|
|
];
|
|
|
|
|
2023-09-28 03:11:51 +00:00
|
|
|
proxyVendor = true; # darwin/linux hash mismatch
|
2024-09-28 13:20:37 +00:00
|
|
|
vendorHash = "sha256-csoSvu7uce1diB4EsQCRRt08mX+rJoxfZqAtaoo0x4M=";
|
2023-06-09 13:04:50 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd deck \
|
|
|
|
--bash <($out/bin/deck completion bash) \
|
|
|
|
--fish <($out/bin/deck completion fish) \
|
|
|
|
--zsh <($out/bin/deck completion zsh)
|
|
|
|
'';
|
|
|
|
|
2024-09-28 13:08:02 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
2023-06-09 13:04:50 +00:00
|
|
|
description = "Configuration management and drift detection tool for Kong";
|
|
|
|
homepage = "https://github.com/Kong/deck";
|
2024-09-28 13:08:02 +00:00
|
|
|
license = lib.licenses.asl20;
|
2024-09-27 04:01:02 +00:00
|
|
|
mainProgram = "deck";
|
2024-09-28 13:08:02 +00:00
|
|
|
maintainers = with lib.maintainers; [ liyangau ];
|
2023-06-09 13:04:50 +00:00
|
|
|
};
|
|
|
|
}
|