highs: 1.8.0 -> 1.8.1 (#360451)
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / sql-exporter.nix
blobed3602aa6d59308bf7e8cdb5ebf013ffe7bf19a9
1 { lib, buildGoModule, fetchFromGitHub, go, prometheus-sql-exporter, testers }:
3 buildGoModule rec {
4   pname = "sql_exporter";
5   version = "0.5.8";
7   src = fetchFromGitHub {
8     owner = "justwatchcom";
9     repo = pname;
10     rev = "v${version}";
11     sha256 = "sha256-Uf5Itclc43E8tsgS8rR8F2Dq9gNVIagoB5KfEqqd7MI=";
12   };
14   vendorHash = null;
16   ldflags = let t = "github.com/prometheus/common/version"; in
17     [
18       "-X ${t}.Version=${version}"
19       "-X ${t}.Revision=${src.rev}"
20       "-X ${t}.Branch=unknown"
21       "-X ${t}.BuildUser=nix@nixpkgs"
22       "-X ${t}.BuildDate=unknown"
23       "-X ${t}.GoVersion=${lib.getVersion go}"
24     ];
26   passthru.tests.version = testers.testVersion {
27     package = prometheus-sql-exporter;
28     command = "sql_exporter -version";
29   };
31   meta = with lib; {
32     description = "Flexible SQL exporter for Prometheus";
33     mainProgram = "sql_exporter";
34     homepage = "https://github.com/justwatchcom/sql_exporter";
35     license = licenses.mit;
36     maintainers = with maintainers; [ justinas ];
37   };