Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 40 lines 1.1 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 nixosTests, 6}: 7 8buildGoModule rec { 9 pname = "systemd_exporter"; 10 version = "0.7.0"; 11 12 vendorHash = "sha256-4hsQ1417jLNOAqGkfCkzrmEtYR4YLLW2j0CiJtPg6GI="; 13 14 src = fetchFromGitHub { 15 owner = "prometheus-community"; 16 repo = pname; 17 rev = "v${version}"; 18 sha256 = "sha256-wWXtAyQ48fsh/9BBo2tHXf4QS3Pbsmj6rha28TdBRWI="; 19 }; 20 21 ldflags = [ 22 "-s" 23 "-w" 24 "-X github.com/prometheus/common/version.Version=${version}" 25 "-X github.com/prometheus/common/version.Revision=unknown" 26 "-X github.com/prometheus/common/version.Branch=unknown" 27 "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs" 28 "-X github.com/prometheus/common/version.BuildDate=unknown" 29 ]; 30 31 passthru.tests = { inherit (nixosTests.prometheus-exporters) systemd; }; 32 33 meta = with lib; { 34 description = "Exporter for systemd unit metrics"; 35 mainProgram = "systemd_exporter"; 36 homepage = "https://github.com/prometheus-community/systemd_exporter"; 37 license = licenses.asl20; 38 maintainers = with maintainers; [ chkno ]; 39 }; 40}