summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/networking/deck
diff options
context:
space:
mode:
authorylbeethoven <ylbeethoven@gmail.com>2023-06-09 23:04:50 +1000
committerliyangau <li.yang@konghq.com>2023-06-13 00:19:38 +1000
commit81b627fc5b71e6638227f10fd5995a9039542aff (patch)
tree313817e7ce6f2023b9ae5b4d1c776aa14daea64e /pkgs/applications/networking/deck
parentf0cbc8c45a16e26d5f944f0c46fa9829736f4bb2 (diff)
deck: init at 1.22.0
decK is a package to manage Kong API gateway configurations declaratively.
Diffstat (limited to 'pkgs/applications/networking/deck')
-rw-r--r--pkgs/applications/networking/deck/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/applications/networking/deck/default.nix b/pkgs/applications/networking/deck/default.nix
new file mode 100644
index 000000000000..f9c66d633864
--- /dev/null
+++ b/pkgs/applications/networking/deck/default.nix
@@ -0,0 +1,39 @@
+{ buildGoModule, lib, installShellFiles, fetchFromGitHub }:
+let
+ short_hash = "7447a09";
+in buildGoModule rec {
+ pname = "deck";
+ version = "1.22.0";
+
+ src = fetchFromGitHub {
+ owner = "Kong";
+ repo = "deck";
+ rev = "v${version}";
+ hash = "sha256-BCx4bw+FrnH291sp52Dz+dc6cYtoLAt8fmdF6YbmgOE=";
+ };
+
+ 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}"
+ ];
+
+ vendorSha256 = "sha256-rir8z1IwQenTvihHWaA7dx6Nn45M82ulCNRJuQlUhEM=";
+
+ 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 ];
+ };
+}