depot/pkgs/servers/monitoring/prometheus/mongodb-exporter.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

39 lines
998 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "mongodb_exporter";
version = "0.41.2";
src = fetchFromGitHub {
owner = "percona";
repo = "mongodb_exporter";
rev = "v${version}";
hash = "sha256-d2/N/NqtRglRN/3E7B5FOMpcQXP/taKFYodc6mhW7A4=";
};
vendorHash = "sha256-hy2w1Ix202gSJyp/EQ6uKJC8y16nw8Y78kDaP9LbU/4=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.commit=${src.rev}"
"-X main.Branch=unknown"
"-X main.buildDate=unknown"
];
subPackages = [ "." ];
# those check depends on docker;
# nixpkgs doesn't have mongodb application available;
doCheck = false;
meta = with lib;
{
description = "Prometheus exporter for MongoDB including sharding, replication and storage engines";
homepage = "https://github.com/percona/mongodb_exporter";
license = licenses.asl20;
maintainers = with maintainers; [ undefined-moe ];
mainProgram = "mongodb_exporter";
};
}