From 9c0e4b3b6098273a3a8e5c06d4bb2d3ec9f80723 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 6 Sep 2024 10:55:04 +0200 Subject: [PATCH 1/3] dmarc-metrics-exporter: format with nixfmt --- .../dmarc-metrics-exporter/default.nix | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix b/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix index 169e14f75753..ca4822859792 100644 --- a/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix +++ b/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix @@ -1,6 +1,7 @@ -{ lib -, python3 -, fetchFromGitHub +{ + lib, + python3, + fetchFromGitHub, }: python3.pkgs.buildPythonApplication rec { @@ -24,15 +25,17 @@ python3.pkgs.buildPythonApplication rec { poetry-core ]; - propagatedBuildInputs = with python3.pkgs; [ - bite-parser - dataclasses-serialization - prometheus-client - structlog - uvicorn - xsdata - ] - ++ uvicorn.optional-dependencies.standard; + propagatedBuildInputs = + with python3.pkgs; + [ + bite-parser + dataclasses-serialization + prometheus-client + structlog + uvicorn + xsdata + ] + ++ uvicorn.optional-dependencies.standard; nativeCheckInputs = with python3.pkgs; [ aiohttp From 68843533645276b26a6969b935b149aff44eeef6 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 6 Sep 2024 10:55:45 +0200 Subject: [PATCH 2/3] dmarc-metrics-exporter: clean --- .../prometheus/dmarc-metrics-exporter/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix b/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix index ca4822859792..33a3998caefd 100644 --- a/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix +++ b/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix @@ -8,8 +8,6 @@ python3.pkgs.buildPythonApplication rec { pname = "dmarc-metrics-exporter"; version = "1.1.0"; - disabled = python3.pythonOlder "3.8"; - pyproject = true; src = fetchFromGitHub { @@ -21,11 +19,11 @@ python3.pkgs.buildPythonApplication rec { pythonRelaxDeps = true; - nativeBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ poetry-core ]; - propagatedBuildInputs = + dependencies = with python3.pkgs; [ bite-parser From f13dd1c43a10079fcc90fad11eb1570a67da990b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 6 Sep 2024 10:56:12 +0200 Subject: [PATCH 3/3] dmarc-metrics-exporter: disable flaky tests on darwin --- .../prometheus/dmarc-metrics-exporter/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix b/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix index 33a3998caefd..7b6ef72c7d20 100644 --- a/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix +++ b/pkgs/servers/monitoring/prometheus/dmarc-metrics-exporter/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, python3, fetchFromGitHub, }: @@ -42,6 +43,12 @@ python3.pkgs.buildPythonApplication rec { requests ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + # flaky tests + "test_build_info" + "test_prometheus_exporter" + ]; + disabledTestPaths = [ # require networking "dmarc_metrics_exporter/tests/test_e2e.py"