Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / smartctl-exporter / default.nix
blobb03a006982ecb3ed9fab0e793624fa13ea959ba0
1 { lib
2 , fetchFromGitHub
3 , buildGoModule
4 , nixosTests
5 }:
7 buildGoModule rec {
8   pname = "smartctl_exporter";
9   version = "0.12.0";
11   src = fetchFromGitHub {
12     owner = "prometheus-community";
13     repo = pname;
14     rev = "refs/tags/v${version}";
15     hash = "sha256-QQoWAsnE/7ifvgEfQJ6cbzmwOrE7oe2zalTbu/P7r18=";
16   };
18   vendorHash = "sha256-WUB2FgBl4Tybz7T0yvcSYIlG75NEhXpn1F0yuB9F21g=";
20   ldflags = [
21     "-X github.com/prometheus/common/version.Version=${version}"
22   ];
24   passthru.tests = { inherit (nixosTests.prometheus-exporters) smartctl; };
26   meta = with lib; {
27     description = "Export smartctl statistics for Prometheus";
28     mainProgram = "smartctl_exporter";
29     homepage = "https://github.com/prometheus-community/smartctl_exporter";
30     license = licenses.lgpl3;
31     platforms = platforms.linux;
32     maintainers = with maintainers; [ hexa Frostman ];
33   };