From 81b627fc5b71e6638227f10fd5995a9039542aff Mon Sep 17 00:00:00 2001 From: ylbeethoven Date: Fri, 9 Jun 2023 23:04:50 +1000 Subject: [PATCH] deck: init at 1.22.0 decK is a package to manage Kong API gateway configurations declaratively. --- maintainers/maintainer-list.nix | 6 +++ pkgs/applications/networking/deck/default.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 47 insertions(+) create mode 100644 pkgs/applications/networking/deck/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b0395c42dcd9..c4ee97c61bd2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9202,6 +9202,12 @@ fingerprint = "74F5 E5CC 19D3 B5CB 608F 6124 68FF 81E6 A785 0F49"; }]; }; + liyangau = { + email = "d@aufomm.com"; + github = "liyangau"; + githubId = 71299093; + name = "Li Yang"; + }; lizelive = { email = "nixpkgs@lize.live"; github = "lizelive"; 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6a3866691b37..df4d8513bd15 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4600,6 +4600,8 @@ with pkgs; dduper = callPackage ../tools/filesystems/dduper { }; + deck = callPackage ../applications/networking/deck { }; + dedup = callPackage ../tools/backup/dedup { }; deheader = callPackage ../development/tools/misc/deheader { };