config/packages/snmp-yaml/default.nix

17 lines
330 B
Nix
Raw Normal View History

2023-09-03 18:41:28 +03:00
{
stdenv,
pkgs,
}:
stdenv.mkDerivation {
2023-09-05 09:23:34 +03:00
name = "snmp-yaml";
2023-09-03 18:41:28 +03:00
2023-09-05 09:23:34 +03:00
buildInputs = [pkgs.prometheus-snmp-exporter];
2023-09-03 18:41:28 +03:00
installPhase = ''
mkdir -p $out
2023-09-05 09:23:34 +03:00
${pkgs.prometheus-snmp-exporter}/bin/generator generate \
${pkgs.prometheus-snmp-exporter}/generator/generator.yaml \
2023-09-03 18:41:28 +03:00
--output-path=$out/snmp.yml
'';
}