depot/third_party/nixpkgs/pkgs/applications/networking/deck/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

39 lines
1 KiB
Nix

{ buildGoModule, lib, installShellFiles, fetchFromGitHub }:
buildGoModule rec {
pname = "deck";
version = "1.29.2";
src = fetchFromGitHub {
owner = "Kong";
repo = "deck";
rev = "v${version}";
hash = "sha256-UQgNLlV4FoKd23zkReTftDnHBtjtKjoXuqJPGTNX+CI=";
};
nativeBuildInputs = [ installShellFiles ];
CGO_ENABLED = 0;
ldflags = [
"-s -w -X github.com/kong/deck/cmd.VERSION=${version}"
"-X github.com/kong/deck/cmd.COMMIT=${src.rev}"
];
proxyVendor = true; # darwin/linux hash mismatch
vendorHash = "sha256-qLcOL7XuXNR/9Q/D5I7KcMNdveACommFndHjqpbPfbE=";
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 ];
};
}