{ lib, stdenv, mkDiscoursePlugin, fetchFromGitHub }: mkDiscoursePlugin { bundlerEnvArgs.gemdir = ./.; name = "discourse-prometheus"; src = fetchFromGitHub { owner = "discourse"; repo = "discourse-prometheus"; rev = "305610c90079556cdfa2aa09b567a6ca10d11de5"; sha256 = "sha256-dz+/2pbbhs8sxYMxe/wAjvdxoU4ihjN95A4ngP0KzQg="; }; 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"; }; }