about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix
new file mode 100644
index 000000000000..95bf4c5a679a
--- /dev/null
+++ b/nixpkgs/pkgs/servers/web-apps/discourse/plugins/discourse-prometheus/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, mkDiscoursePlugin, fetchFromGitHub }:
+
+ mkDiscoursePlugin {
+  bundlerEnvArgs.gemdir = ./.;
+  name = "discourse-prometheus";
+  src = fetchFromGitHub {
+    owner = "discourse";
+    repo = "discourse-prometheus";
+    rev = "8a7a46a80cc65aa0839bc5e3c3b6f8ef6544089f";
+    sha256 = "sha256-TL+pbP26LvRMKdy8CAuBEK+LZfAs8HfggMeUDaBu9hc=";
+  };
+
+  patches = [
+    # The metrics collector tries to run git to get the commit id but fails
+    # because we don't run Discourse from a Git repository.
+    ./no-git-version.patch
+    ./spec-import-fix-abi-version.patch
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/discourse/discourse-prometheus";
+    maintainers = with maintainers; [ dpausp ];
+    license = licenses.mit;
+    description = "Official Discourse Plugin for Prometheus Monitoring";
+  };
+}