Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 = "9da0e79ef30544a626bc65c3697ef5c9005b01d2";
14 sha256 = "sha256-jq2tFzNshYZQRpiKsENB5dnKSlBgTjBQpMd4CPu7LIU=";
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 = {
25 homepage = "https://github.com/discourse/discourse-prometheus";
26 license = lib.licenses.mit;
27 description = "Official Discourse Plugin for Prometheus Monitoring";
28 };
29}