depot/third_party/nixpkgs/pkgs/applications/networking/deck/default.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

39 lines
1 KiB
Nix

{ buildGoModule, lib, installShellFiles, fetchFromGitHub }:
buildGoModule rec {
pname = "deck";
version = "1.38.1";
src = fetchFromGitHub {
owner = "Kong";
repo = "deck";
rev = "v${version}";
hash = "sha256-9n8XAeSZn2HD8Vg2B8YmBUQ+VPBglgjN+QjrSOgn65Y=";
};
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-2lR2/jHOFmKm3s+EPNRFLlgJHIs+33YDt1YeHBWRin0=";
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 = "Configuration management and drift detection tool for Kong";
homepage = "https://github.com/Kong/deck";
license = licenses.asl20;
maintainers = with maintainers; [ liyangau ];
};
}