From 8b4d882663c08e7d892ea8f6a5984fc1fd0872db Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 27 Jan 2024 21:00:26 +0000 Subject: [PATCH] prometheus-snmp-exporter: update --- .../42c9b661cda04ca33c697fa75e1c0a98d8214233.patch | 13 +++++++++++++ nix/pkgs/prometheus-snmp-config/default.nix | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 nix/pkgs/prometheus-snmp-config/42c9b661cda04ca33c697fa75e1c0a98d8214233.patch diff --git a/nix/pkgs/prometheus-snmp-config/42c9b661cda04ca33c697fa75e1c0a98d8214233.patch b/nix/pkgs/prometheus-snmp-config/42c9b661cda04ca33c697fa75e1c0a98d8214233.patch new file mode 100644 index 0000000000..fb74d1622e --- /dev/null +++ b/nix/pkgs/prometheus-snmp-config/42c9b661cda04ca33c697fa75e1c0a98d8214233.patch @@ -0,0 +1,13 @@ +diff --git a/generator/Makefile b/generator/Makefile +index 789e96c..2474669 100644 +--- a/generator/Makefile ++++ b/generator/Makefile +@@ -20,7 +20,7 @@ DOCKER_IMAGE_NAME ?= snmp-generator + DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) + DOCKER_REPO ?= prom + +-APC_URL := https://download.schneider-electric.com/files?p_enDocType=Firmware&p_File_Name=powernet446.mib&p_Doc_Ref=APC_POWERNETMIB_446_EN ++APC_URL := https://download.schneider-electric.com/files?p_enDocType=Firmware&p_File_Name=powernet449.mib&p_Doc_Ref=APC_POWERNETMIB_449_EN + ARISTA_URL := https://www.arista.com/assets/data/docs/MIBS + CISCO_URL := https://raw.githubusercontent.com/cisco/cisco-mibs/2d465cce2de4e67a3561d8e41e4c99b597558d4b/v2 + IANA_CHARSET_URL := https://www.iana.org/assignments/ianacharset-mib/ianacharset-mib diff --git a/nix/pkgs/prometheus-snmp-config/default.nix b/nix/pkgs/prometheus-snmp-config/default.nix index 1b17aca21c..3eb444c9dc 100644 --- a/nix/pkgs/prometheus-snmp-config/default.nix +++ b/nix/pkgs/prometheus-snmp-config/default.nix @@ -24,7 +24,7 @@ let version = "lukegb-${prometheus-snmp-exporter.version}"; outputHashMode = "recursive"; - outputHash = "sha256:0i2cn5yxb2rnkg91wjmyzd5g2y3cr5yhfkbr9715kw5qk4rf73a0"; + outputHash = "sha256:1bsksj21ffzr5b53h2bxk10n8zyasxwxvbfmzrs0x3pbpfmf9bxx"; buildInputs = [ curl @@ -44,6 +44,11 @@ let cp $src/generator/Makefile $NIX_BUILD_TOP/build/Makefile ''; + patchPhase = '' + sed -i $NIX_BUILD_TOP/build/Makefile -e 's,powernet446,powernet451,g' -e 's,POWERNETMIB_446,POWERNETMIB_451,g' + cat $NIX_BUILD_TOP/build/Makefile + ''; + buildPhase = '' pushd $NIX_BUILD_TOP/build mkdir mibs