From aff037092f9c7a6c502dfacd1a696a038babd146 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 26 Jul 2024 13:00:23 +0200 Subject: [PATCH] logdy: init at 0.13.0 --- pkgs/by-name/lo/logdy/package.nix | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pkgs/by-name/lo/logdy/package.nix diff --git a/pkgs/by-name/lo/logdy/package.nix b/pkgs/by-name/lo/logdy/package.nix new file mode 100644 index 000000000000..9b2de9f74fe4 --- /dev/null +++ b/pkgs/by-name/lo/logdy/package.nix @@ -0,0 +1,60 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, +}: + +buildGoModule rec { + pname = "logdy"; + version = "0.13.0"; + + src = fetchFromGitHub { + owner = "logdyhq"; + repo = "logdy-core"; + rev = "v${version}"; + hash = "sha256-HlIl/4C1wheAxc0ReUN8xQrXJ0djoO7E0qhRwyFHEiE="; + }; + + vendorHash = "sha256-kFhcbBMymzlJ+2zw7l09LJfCdps26Id+VzOehqrLDWU="; + + ldflags = [ + "-s" + "-w" + ]; + + nativeBuildInputs = [ installShellFiles ]; + + # After the build this derivation will generate two binaries. + # The first one is getting renamed based on the documentation + # The second one is just to launch a demo. This functionality could be achieved with the first one + postInstall = '' + mv $out/bin/logdy-core $out/bin/logdy + rm -f $out/bin/example-app + + installShellCompletion --cmd logdy \ + --bash <($out/bin/logdy completion bash) \ + --fish <($out/bin/logdy completion fish) \ + --zsh <($out/bin/logdy completion zsh) + ''; + + checkFlags = [ + "-skip=^TestClientLoad$" # index out of range + ]; + + meta = { + description = "Web based real-time log viewer"; + longDescription = '' + Web based real-time log viewer. + Stream ANY content to a web UI with autogenerated filters. + Parse any format with TypeScript + ''; + homepage = "https://github.com/logdyhq/logdy-core"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + sigmanificient + ByteSudoer + ]; + mainProgram = "logdy"; + }; +}