diff --git a/default.nix b/default.nix index 72f60bc..f6d0b8e 100644 --- a/default.nix +++ b/default.nix @@ -14,11 +14,13 @@ lib.makeScope pkgs.newScope (self: { plugins = { code-owners = self.callPackage ./plugins/code-owners { }; oauth = self.callPackage ./plugins/oauth { }; + metrics-reporter-prometheus = self.callPackage ./plugins/metrics-reporter-prometheus { }; }; ci = pkgs.linkFarm "gerrit-ci" [ { name = "gerrit"; path = self.gerrit; } { name = "code-owners.jar"; path = self.plugins.code-owners; } { name = "oauth.jar"; path = self.plugins.oauth; } + { name = "metrics-reporter-prometheus.jar"; path = self.plugins.metrics-reporter-prometheus; } ]; }) diff --git a/plugins/metrics-reporter-prometheus/default.nix b/plugins/metrics-reporter-prometheus/default.nix new file mode 100644 index 0000000..4c80a11 --- /dev/null +++ b/plugins/metrics-reporter-prometheus/default.nix @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: 2024 The nix-gerrit Authors +# SPDX-License-Identifier: MIT + +{ buildGerritBazelPlugin, fetchgit }: + +buildGerritBazelPlugin rec { + name = "metrics-reporter-prometheus"; + version = "f2ee1d"; + src = fetchgit { + url = "https://gerrit.googlesource.com/plugins/metrics-reporter-prometheus"; + rev = "f2ee1de665281596ae300144243fcf94bf6f1f7d"; + hash = "sha256-iUFzSXKIKBdZBZMpZiejkEEXXI20wTJQRYkufc/YjOM="; + }; + depsHash = "sha256-hxnQlzzVQ15fyVo613FOsHlZZgOL1lBKOgqEGBoc7To="; + postOverlayPlugin = '' + cp "${src}/external_plugin_deps.bzl" "$out/plugins/external_plugin_deps.bzl" + ''; +}