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