2023-07-15 17:15:38 +00:00
|
|
|
{ buildGoModule, lib, installShellFiles, fetchFromGitHub }:
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
2023-07-15 17:15:38 +00:00
|
|
|
pname = "deck";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.38.0";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Kong";
|
|
|
|
repo = "deck";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-9bEPkEeKOVFETSo5HEFWbuhx7+mWwogGm1jN18Vj/Sw=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s -w -X github.com/kong/deck/cmd.VERSION=${version}"
|
2023-10-09 19:29:22 +00:00
|
|
|
"-X github.com/kong/deck/cmd.COMMIT=${src.rev}"
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
proxyVendor = true; # darwin/linux hash mismatch
|
2024-06-05 15:53:02 +00:00
|
|
|
vendorHash = "sha256-eWDnZNNXgvIiDiKEpkVEL/JpEfy7WKtSAUA6riCrMdc=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd deck \
|
|
|
|
--bash <($out/bin/deck completion bash) \
|
|
|
|
--fish <($out/bin/deck completion fish) \
|
|
|
|
--zsh <($out/bin/deck completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A configuration management and drift detection tool for Kong";
|
|
|
|
homepage = "https://github.com/Kong/deck";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ liyangau ];
|
|
|
|
};
|
|
|
|
}
|