From 22480044f195fc44ebfdceb5eab9a00f605895cd Mon Sep 17 00:00:00 2001 From: sandydoo Date: Wed, 26 Apr 2023 09:00:05 +0000 Subject: [PATCH] datadog-integrations-core: add missing modules and dependencies --- .../networking/dd-agent/integrations-core.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/tools/networking/dd-agent/integrations-core.nix b/pkgs/tools/networking/dd-agent/integrations-core.nix index ca1ffa3f2559..8e0ed84e8a06 100644 --- a/pkgs/tools/networking/dd-agent/integrations-core.nix +++ b/pkgs/tools/networking/dd-agent/integrations-core.nix @@ -59,7 +59,16 @@ let datadog_checks_base = buildIntegration { pname = "checks-base"; sourceRoot = "datadog_checks_base"; + + # Make setuptools build the 'base' and 'checks' modules. + postPatch = '' + substituteInPlace setup.py \ + --replace "from setuptools import setup" "from setuptools import find_packages, setup" \ + --replace "packages=['datadog_checks']" "packages=find_packages()" + ''; + propagatedBuildInputs = with python.pkgs; [ + binary cachetools cryptography immutables @@ -76,6 +85,12 @@ let uptime wrapt ]; + + pythonImportsCheck = [ + "datadog_checks.base" + "datadog_checks.base.checks" + "datadog_checks.checks" + ]; }; # Default integrations that should be built: