depot/third_party/nixpkgs/pkgs/applications/networking/deck/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

39 lines
1 KiB
Nix

{ buildGoModule, lib, installShellFiles, fetchFromGitHub }:
let
short_hash = "69aa892";
in buildGoModule rec {
pname = "deck";
version = "1.23.0";
src = fetchFromGitHub {
owner = "Kong";
repo = "deck";
rev = "v${version}";
hash = "sha256-PrpiZBGNb8tWt2RiZ4iHKibN+2EQRm1/tBbDLng/lkA=";
};
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}"
];
vendorHash = "sha256-brd+gtIHIarMv3l6O6JMDPRFlMwKSLZjBABAvByUC6o=";
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 ];
};
}