depot/third_party/nixpkgs/pkgs/applications/networking/deck/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

39 lines
1 KiB
Nix

{ buildGoModule, lib, installShellFiles, fetchFromGitHub }:
let
short_hash = "86497a5";
in buildGoModule rec {
pname = "deck";
version = "1.25.0";
src = fetchFromGitHub {
owner = "Kong";
repo = "deck";
rev = "v${version}";
hash = "sha256-dmzxCgZ0HLT9he8jS7lMtSFg5vbEbs8q368vE3lafhQ=";
};
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-ucwJQSZSBvSJzNQYLeNyCnZETmrNgVPFLjjkr1zP6b4=";
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 ];
};
}