1{
2 lib,
3 mkDiscoursePlugin,
4 fetchFromGitHub,
5}:
6
7mkDiscoursePlugin {
8 bundlerEnvArgs.gemdir = ./.;
9 name = "discourse-prometheus";
10 src = fetchFromGitHub {
11 owner = "discourse";
12 repo = "discourse-prometheus";
13 rev = "f46906e1d555f6838d74ea38d5037264cc1020b0";
14 sha256 = "sha256-czrxhH0L+vCZA8DKN6acW///iWJs9GIppEeaP2MOJBQ=";
15 };
16
17 patches = [
18 # The metrics collector tries to run git to get the commit id but fails
19 # because we don't run Discourse from a Git repository.
20 ./no-git-version.patch
21 ./spec-import-fix-abi-version.patch
22 ];
23
24 meta = with lib; {
25 homepage = "https://github.com/discourse/discourse-prometheus";
26 maintainers = with maintainers; [ dpausp ];
27 license = licenses.mit;
28 description = "Official Discourse Plugin for Prometheus Monitoring";
29 };
30}