2023-09-03 18:41:28 +03:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
pkgs,
|
2023-09-05 14:14:45 +03:00
|
|
|
prometheus-snmp-exporter,
|
2023-09-03 18:41:28 +03:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
2023-09-05 09:23:34 +03:00
|
|
|
name = "snmp-yaml";
|
2023-09-05 14:14:45 +03:00
|
|
|
inherit (prometheus-snmp-exporter) version src;
|
2023-09-03 18:41:28 +03:00
|
|
|
|
2023-09-05 14:14:45 +03:00
|
|
|
buildInputs = [prometheus-snmp-exporter];
|
2023-09-03 18:41:28 +03:00
|
|
|
|
2023-09-05 14:14:45 +03:00
|
|
|
buildPhase = ''
|
2023-09-03 18:41:28 +03:00
|
|
|
mkdir -p $out
|
2023-09-05 14:14:45 +03:00
|
|
|
set -x
|
|
|
|
cd $src/generator
|
|
|
|
${prometheus-snmp-exporter}/bin/generator generate \
|
2023-09-03 18:41:28 +03:00
|
|
|
--output-path=$out/snmp.yml
|
|
|
|
'';
|
|
|
|
}
|