2023-06-09 15:04:50 +02:00
|
|
|
{ buildGoModule, lib, installShellFiles, fetchFromGitHub }:
|
2023-09-28 05:11:51 +02:00
|
|
|
|
|
|
|
buildGoModule rec {
|
2023-06-09 15:04:50 +02:00
|
|
|
pname = "deck";
|
2023-09-28 05:11:51 +02:00
|
|
|
version = "1.27.0";
|
2023-06-09 15:04:50 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Kong";
|
|
|
|
repo = "deck";
|
|
|
|
rev = "v${version}";
|
2023-09-28 05:11:51 +02:00
|
|
|
hash = "sha256-QP267H1vfsIo1EhV9vAWt03ewGufPHT8sZWcj/AHuxw=";
|
2023-06-09 15:04:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s -w -X github.com/kong/deck/cmd.VERSION=${version}"
|
2023-09-28 05:11:51 +02:00
|
|
|
"-X github.com/kong/deck/cmd.COMMIT=${src.rev}"
|
2023-06-09 15:04:50 +02:00
|
|
|
];
|
|
|
|
|
2023-09-28 05:11:51 +02:00
|
|
|
proxyVendor = true; # darwin/linux hash mismatch
|
|
|
|
vendorHash = "sha256-ikgD17+lnKpxCzrIkOXOq332X48qEdSWXIIRoq76fB4=";
|
2023-06-09 15:04:50 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|