1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nixosTests,
6}:
7
8buildGoModule rec {
9 pname = "shelly_exporter";
10 version = "1.0.0";
11
12 src = fetchFromGitHub {
13 owner = "aexel90";
14 repo = pname;
15 rev = "v${version}";
16 sha256 = "sha256-L0TuBDq5eEahQvzqd1WuvmXuQbbblCM+Nvj15IybnVo=";
17 };
18
19 vendorHash = "sha256-BCrge2xLT4b4wpYA+zcsH64a/nfV8+HeZF7L49p2gEw=";
20
21 passthru.tests = { inherit (nixosTests.prometheus-exporters) shelly; };
22
23 meta = with lib; {
24 description = "Shelly humidity sensor exporter for prometheus";
25 mainProgram = "shelly_exporter";
26 homepage = "https://github.com/aexel90/shelly_exporter";
27 license = licenses.asl20;
28 maintainers = with maintainers; [ drupol ];
29 };
30}