Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
nixosTests,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "systemd_exporter";
|
|
version = "0.7.0";
|
|
|
|
vendorHash = "sha256-4hsQ1417jLNOAqGkfCkzrmEtYR4YLLW2j0CiJtPg6GI=";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "prometheus-community";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-wWXtAyQ48fsh/9BBo2tHXf4QS3Pbsmj6rha28TdBRWI=";
|
|
};
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/prometheus/common/version.Version=${version}"
|
|
"-X github.com/prometheus/common/version.Revision=unknown"
|
|
"-X github.com/prometheus/common/version.Branch=unknown"
|
|
"-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
|
|
"-X github.com/prometheus/common/version.BuildDate=unknown"
|
|
];
|
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) systemd; };
|
|
|
|
meta = with lib; {
|
|
description = "Exporter for systemd unit metrics";
|
|
mainProgram = "systemd_exporter";
|
|
homepage = "https://github.com/prometheus-community/systemd_exporter";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ chkno ];
|
|
};
|
|
}
|