2021-03-31 18:29:42 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2019-08-01 21:10:08 +00:00
|
|
|
|
2021-03-31 18:29:42 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "postgres_exporter";
|
2023-09-20 17:39:20 +00:00
|
|
|
version = "0.14.0";
|
2019-08-01 21:10:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-01-28 22:29:46 +00:00
|
|
|
owner = "prometheus-community";
|
2019-08-01 21:10:08 +00:00
|
|
|
repo = "postgres_exporter";
|
|
|
|
rev = "v${version}";
|
2023-09-20 17:39:20 +00:00
|
|
|
sha256 = "sha256-Y66VxzKaadTNE/84aQxgTKsr/KpXwq2W/1BOvsvyNbM=";
|
2019-08-01 21:10:08 +00:00
|
|
|
};
|
|
|
|
|
2023-09-20 17:39:20 +00:00
|
|
|
vendorHash = "sha256-+ly4zZFCnrWycdi/RP8L0yG5/lsGzu4VwKDlea2prio=";
|
2023-06-23 16:30:36 +00:00
|
|
|
|
|
|
|
ldflags =
|
|
|
|
let
|
|
|
|
t = "github.com/prometheus/common/version";
|
|
|
|
in
|
|
|
|
[ "-s" "-w"
|
|
|
|
"-X ${t}.Version=${version}"
|
|
|
|
"-X ${t}.Revision=unknown"
|
|
|
|
"-X ${t}.Branch=unknown"
|
|
|
|
"-X ${t}.BuildUser=nix@nixpkgs"
|
|
|
|
"-X ${t}.BuildDate=unknown"
|
|
|
|
];
|
2021-03-31 18:29:42 +00:00
|
|
|
|
2019-10-31 22:49:15 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2020-06-18 10:48:40 +00:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) postgres; };
|
|
|
|
|
2019-10-30 15:12:11 +00:00
|
|
|
meta = with lib; {
|
2019-08-01 21:10:08 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "A Prometheus exporter for PostgreSQL";
|
|
|
|
license = licenses.asl20;
|
2021-03-31 18:29:42 +00:00
|
|
|
maintainers = with maintainers; [ fpletz globin willibutz ma27 ];
|
2019-08-01 21:10:08 +00:00
|
|
|
};
|
|
|
|
}
|