Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / systemd-exporter.nix
blob5448aeb52d59af64362b5996961615599f3d0ca7
1 { lib, buildGoModule, fetchFromGitHub, nixosTests }:
3 buildGoModule rec {
4   pname = "systemd_exporter";
5   version = "0.6.0";
7   vendorHash = "sha256-D5ASUP6XHNeHZqH/ui5GvxWis/NQrRpN/+wkO4fKkA8=";
9   src = fetchFromGitHub {
10     owner = "prometheus-community";
11     repo = pname;
12     rev = "v${version}";
13     sha256 = "sha256-zLg4cOZUh50OFPp4mKR/FY0JfzVmXmDFcKkhB6DalGc=";
14   };
16   ldflags = [
17     "-s"
18     "-w"
19     "-X github.com/prometheus/common/version.Version=${version}"
20     "-X github.com/prometheus/common/version.Revision=unknown"
21     "-X github.com/prometheus/common/version.Branch=unknown"
22     "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
23     "-X github.com/prometheus/common/version.BuildDate=unknown"
24   ];
26   passthru.tests = { inherit (nixosTests.prometheus-exporters) systemd; };
28   meta = with lib; {
29     description = "Exporter for systemd unit metrics";
30     mainProgram = "systemd_exporter";
31     homepage = "https://github.com/prometheus-community/systemd_exporter";
32     license = licenses.asl20;
33     maintainers = with maintainers; [ chkno ];
34   };