Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 buildGoModule, 3 lib, 4 installShellFiles, 5 fetchFromGitHub, 6 nix-update-script, 7}: 8 9buildGoModule rec { 10 pname = "deck"; 11 version = "1.47.0"; 12 13 src = fetchFromGitHub { 14 owner = "Kong"; 15 repo = "deck"; 16 tag = "v${version}"; 17 hash = "sha256-k/cAybKJq/s5PcEMjT92dZlue9XpEeeHwICHk8ex3G8="; 18 }; 19 20 nativeBuildInputs = [ installShellFiles ]; 21 22 env.CGO_ENABLED = 0; 23 24 ldflags = [ 25 "-s -w -X github.com/kong/deck/cmd.VERSION=${version}" 26 "-X github.com/kong/deck/cmd.COMMIT=${src.rev}" 27 ]; 28 29 proxyVendor = true; # darwin/linux hash mismatch 30 vendorHash = "sha256-nKKCz7T6HLCBwQjPV/kpzgtR8yNiZS/Ta0H1DlKaLk8="; 31 32 postInstall = '' 33 installShellCompletion --cmd deck \ 34 --bash <($out/bin/deck completion bash) \ 35 --fish <($out/bin/deck completion fish) \ 36 --zsh <($out/bin/deck completion zsh) 37 ''; 38 39 passthru.updateScript = nix-update-script { }; 40 41 meta = { 42 description = "Configuration management and drift detection tool for Kong"; 43 homepage = "https://github.com/Kong/deck"; 44 license = lib.licenses.asl20; 45 mainProgram = "deck"; 46 maintainers = with lib.maintainers; [ liyangau ]; 47 }; 48}