depot/third_party/nixpkgs/pkgs/by-name/de/deck/package.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

48 lines
1.1 KiB
Nix

{
buildGoModule,
lib,
installShellFiles,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule rec {
pname = "deck";
version = "1.40.3";
src = fetchFromGitHub {
owner = "Kong";
repo = "deck";
rev = "refs/tags/v${version}";
hash = "sha256-n6WASCtDwBX4FASSWI17JpU7rDXIeSidPWhj/MB2tUs=";
};
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-csoSvu7uce1diB4EsQCRRt08mX+rJoxfZqAtaoo0x4M=";
postInstall = ''
installShellCompletion --cmd deck \
--bash <($out/bin/deck completion bash) \
--fish <($out/bin/deck completion fish) \
--zsh <($out/bin/deck completion zsh)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Configuration management and drift detection tool for Kong";
homepage = "https://github.com/Kong/deck";
license = lib.licenses.asl20;
mainProgram = "deck";
maintainers = with lib.maintainers; [ liyangau ];
};
}