about summary refs log tree commit diff
path: root/pkgs/servers/monitoring
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2023-02-23 13:54:31 +0900
committerGitHub <noreply@github.com>2023-02-23 13:54:31 +0900
commit83e7e83ea75b9f21a5882d5968ce20eb9a3399da (patch)
tree21d4155386839b704447a6b08ec54b9166da15d1 /pkgs/servers/monitoring
parent56b29caf07c19670f134ab5f0412890b7dece7d5 (diff)
parent44f8fcf2231bb8a3019ce7ac234c727200e94dcc (diff)
Merge pull request #205033 from CathalMullan/phlare
phlare: init at 0.3.0
Diffstat (limited to 'pkgs/servers/monitoring')
-rw-r--r--pkgs/servers/monitoring/phlare/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/servers/monitoring/phlare/default.nix b/pkgs/servers/monitoring/phlare/default.nix
new file mode 100644
index 0000000000000..2730686bdc81d
--- /dev/null
+++ b/pkgs/servers/monitoring/phlare/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "phlare";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "grafana";
+    repo = "phlare";
+    sha256 = "sha256-z1PT5chkpHQJPziY7bGf6W1X5uezL6E2GUV6w/NlyFk=";
+  };
+
+  proxyVendor = true;
+  vendorSha256 = "sha256-KJbh+M9jYxUW9akVBHZoB/mtOHWpMPtlwIgC9fu+NYY=";
+
+  ldflags = let
+    prefix = "github.com/grafana/phlare/pkg/util/build";
+  in [
+    "-s" "-w"
+    # https://github.com/grafana/phlare/blob/v0.3.0/Makefile#L32
+    "-X ${prefix}.Version=${version}"
+    "-X ${prefix}.Branch=v${version}"
+    "-X ${prefix}.Revision=v${version}"
+    "-X ${prefix}.BuildUser=nix"
+    "-X ${prefix}.BuildDate=1980-01-01T00:00:00Z"
+  ];
+
+  subPackages = [
+    "cmd/phlare"
+    "cmd/profilecli"
+  ];
+
+  meta = with lib; {
+    description = "Grafana Phlare is an open source database that provides fast, scalable, highly available, and efficient storage and querying of profiling data.";
+    license = licenses.agpl3;
+    homepage = "https://grafana.com/oss/phlare";
+    maintainers = with maintainers; [ cathalmullan ];
+  };
+}