2023-07-15 17:15:38 +00:00
|
|
|
{ buildGoModule, lib, installShellFiles, fetchFromGitHub }:
|
|
|
|
let
|
2023-08-22 20:05:09 +00:00
|
|
|
short_hash = "63b9742";
|
2023-07-15 17:15:38 +00:00
|
|
|
in buildGoModule rec {
|
|
|
|
pname = "deck";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "1.26.0";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Kong";
|
|
|
|
repo = "deck";
|
|
|
|
rev = "v${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-DxmIHJfvRZKsMyFllbfpriT4Ts9f7ha4aZcfVr/b9eA=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s -w -X github.com/kong/deck/cmd.VERSION=${version}"
|
|
|
|
"-X github.com/kong/deck/cmd.COMMIT=${short_hash}"
|
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
vendorHash = "sha256-jhLZvusYpX5fW1NCmJtwE/p9/wTwzA2hbwt657VsZts=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|