config/packages/snmp-yaml/default.nix

17 lines
298 B
Nix

{
stdenv,
pkgs,
}:
stdenv.mkDerivation {
pname = "snmp-yaml";
buildInputs = [pkgs.snmp-exporter];
installPhase = ''
mkdir -p $out
${pkgs.snmp-exporter}/bin/generator generate \
${pkgs.snmp-exporter}/generator/generator.yaml \
--output-path=$out/snmp.yml
'';
}