nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nixosTests,
6}:
7
8buildGoModule rec {
9 pname = "modemmanager-exporter";
10 version = "0.2.0";
11
12 src = fetchFromGitHub {
13 owner = "mdlayher";
14 repo = "modemmanager_exporter";
15 rev = "v${version}";
16 sha256 = "sha256-wQATmTjYsm1J2DicPryoa/jVpbLjXz+1TTQUH5yGV6w=";
17 };
18
19 vendorHash = "sha256-wGCRpFnt9bxc5Ygg6H1kI9sXB4mVFBdLeaahAFtvNbg=";
20
21 passthru.tests = { inherit (nixosTests.prometheus-exporters) modemmanager; };
22
23 meta = {
24 homepage = "https://github.com/mdlayher/modemmanager_exporter";
25 description = "Prometheus exporter for ModemManager and its devices";
26 mainProgram = "modemmanager_exporter";
27 license = lib.licenses.mit;
28 maintainers = with lib.maintainers; [ mdlayher ];
29 };
30}