From 009423e25932bd31c481e73321732507d6bc42f4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 31 Dec 2024 00:31:04 +0100 Subject: [PATCH 1/2] prometheus-rasdaemon-exporter: normalize metric names --- .../pr/prometheus-rasdaemon-exporter/package.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix b/pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix index 97349f5a1086..f4d00872c8fe 100644 --- a/pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix +++ b/pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix @@ -2,6 +2,7 @@ lib, python3Packages, fetchFromGitHub, + fetchpatch2, }: python3Packages.buildPythonApplication { @@ -16,6 +17,19 @@ python3Packages.buildPythonApplication { hash = "sha256-O0Zzog+5jDixFRGbqmjPYi6JDpHbxpU4hKfsqTnexS8="; }; + patches = [ + # Normalization of metric names + # https://github.com/sanecz/prometheus-rasdaemon-exporter/pull/1 + (fetchpatch2 { + url = "https://github.com/sanecz/prometheus-rasdaemon-exporter/commit/46d379ba205c2340a0b266bf3cd48ec88ce025d0.patch"; + hash = "sha256-kqo1Tjn51M1FzArS4K0ylQ2/rFDOAiZU3OUt/oBhGhM="; + }) + (fetchpatch2 { + url = "https://github.com/sanecz/prometheus-rasdaemon-exporter/commit/c9ab08e8918497edb8f1ab0f933fa270cb7860a8.patch"; + hash = "sha256-QtjzXuxPG7e+cgUDVbAVNY4VyBp3W5+vQDAvFJ9t92I="; + }) + ]; + build-system = with python3Packages; [ setuptools setuptools-scm From f7dea2cd214c33efbe052c3fa6ac567ac41b20a1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 31 Dec 2024 00:47:05 +0100 Subject: [PATCH 2/2] prometheus-rasdaemon-exporter: fix sqlite connection setup --- pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix b/pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix index f4d00872c8fe..2eff4095d2a3 100644 --- a/pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix +++ b/pkgs/by-name/pr/prometheus-rasdaemon-exporter/package.nix @@ -28,6 +28,12 @@ python3Packages.buildPythonApplication { url = "https://github.com/sanecz/prometheus-rasdaemon-exporter/commit/c9ab08e8918497edb8f1ab0f933fa270cb7860a8.patch"; hash = "sha256-QtjzXuxPG7e+cgUDVbAVNY4VyBp3W5+vQDAvFJ9t92I="; }) + # Fix sqlite3.connect URI passing + # https://github.com/sanecz/prometheus-rasdaemon-exporter/pull/2 + (fetchpatch2 { + url = "https://github.com/sanecz/prometheus-rasdaemon-exporter/commit/52f6c47b77f480cd7f83853a2baffffb45f77b37.patch"; + hash = "sha256-XYeWMkAhWJIOUKLeTstIJr3P37Jwt8tzRURCvlrrxVs="; + }) ]; build-system = with python3Packages; [