Merge pull request #185805 from Sohalt/dd-fix-python-integration
Datadog fix python integration
This commit is contained in:
commit
f576e3a7e3
2 changed files with 41 additions and 19 deletions
|
@ -1,5 +1,6 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, cmake
|
||||
, buildGoModule
|
||||
, makeWrapper
|
||||
, fetchFromGitHub
|
||||
|
@ -18,18 +19,29 @@ let
|
|||
owner = "DataDog";
|
||||
repo = "datadog-agent";
|
||||
goPackagePath = "github.com/${owner}/${repo}";
|
||||
|
||||
in buildGoModule rec {
|
||||
pname = "datadog-agent";
|
||||
version = "7.36.0";
|
||||
version = "7.38.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit owner repo;
|
||||
rev = version;
|
||||
sha256 = "sha256-pkbgYE58T9QzV7nCzvfBoTt6Ue8cCMUBSuCBeDtdkzo=";
|
||||
sha256 = "sha256-bG8wsSQvZcG4/Th6mWVdVX9vpeYBZx8FxwdYXpIdXnU=";
|
||||
};
|
||||
rtloader = stdenv.mkDerivation {
|
||||
pname = "datadog-agent-rtloader";
|
||||
src = "${src}/rtloader";
|
||||
inherit version;
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ python ];
|
||||
cmakeFlags = ["-DBUILD_DEMO=OFF" "-DDISABLE_PYTHON2=ON"];
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-SxdSoZtRAdl3evCpb+3BHWf/uPYJJKgw0CL9scwNfGA=";
|
||||
in buildGoModule rec {
|
||||
pname = "datadog-agent";
|
||||
inherit src version;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
vendorSha256 = "sha256-bGDf48wFa32hURZfGN5pCMmslC3PeLNayKcl5cfjq9M=";
|
||||
|
||||
subPackages = [
|
||||
"cmd/agent"
|
||||
|
@ -41,12 +53,12 @@ in buildGoModule rec {
|
|||
|
||||
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ];
|
||||
buildInputs = lib.optionals withSystemd [ systemd ];
|
||||
buildInputs = [rtloader] ++ lib.optionals withSystemd [ systemd ];
|
||||
PKG_CONFIG_PATH = "${python}/lib/pkgconfig";
|
||||
|
||||
tags = [
|
||||
"ec2"
|
||||
"cpython"
|
||||
"python"
|
||||
"process"
|
||||
"log"
|
||||
"secrets"
|
||||
|
@ -58,7 +70,8 @@ in buildGoModule rec {
|
|||
"-X ${goPackagePath}/pkg/version.Commit=${src.rev}"
|
||||
"-X ${goPackagePath}/pkg/version.AgentVersion=${version}"
|
||||
"-X ${goPackagePath}/pkg/serializer.AgentPayloadVersion=${payloadVersion}"
|
||||
"-X ${goPackagePath}/pkg/collector/py.pythonHome=${python}"
|
||||
"-X ${goPackagePath}/pkg/collector/python.pythonHome3=${python}"
|
||||
"-X ${goPackagePath}/pkg/config.DefaultPython=3"
|
||||
"-r ${python}/lib"
|
||||
];
|
||||
|
||||
|
|
|
@ -42,20 +42,15 @@ let
|
|||
owner = "DataDog";
|
||||
repo = "integrations-core";
|
||||
rev = version;
|
||||
sha256 = "0424zsnf747s10kfzv5y0m0ac9sgczip78yvghhrc2i089i5z2h4";
|
||||
sha256 = "sha256-CIzuJ97KwsG1k65Y+8IUSka/3JX1pmQKN3hPHzZnGhQ=";
|
||||
};
|
||||
version = "7.30.1";
|
||||
version = "7.38.0";
|
||||
|
||||
# Build helper to build a single datadog integration package.
|
||||
buildIntegration = { pname, ... }@args: python.pkgs.buildPythonPackage (args // {
|
||||
inherit src version;
|
||||
name = "datadog-integration-${pname}-${version}";
|
||||
|
||||
postPatch = ''
|
||||
# jailbreak install_requires
|
||||
sed -i 's/==.*//' requirements.in
|
||||
cp requirements.in requirements.txt
|
||||
'';
|
||||
sourceRoot = "source/${args.sourceRoot or pname}";
|
||||
doCheck = false;
|
||||
});
|
||||
|
@ -65,7 +60,21 @@ let
|
|||
pname = "checks-base";
|
||||
sourceRoot = "datadog_checks_base";
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
requests protobuf prometheus-client simplejson uptime
|
||||
cachetools
|
||||
cryptography
|
||||
immutables
|
||||
jellyfish
|
||||
prometheus-client
|
||||
protobuf
|
||||
pydantic
|
||||
python-dateutil
|
||||
pyyaml
|
||||
requests
|
||||
requests-toolbelt
|
||||
requests-unixsocket
|
||||
simplejson
|
||||
uptime
|
||||
wrapt
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -75,8 +84,8 @@ let
|
|||
mongo = (ps: [ ps.pymongo ]);
|
||||
network = (ps: [ ps.psutil ]);
|
||||
nginx = (ps: []);
|
||||
postgres = (ps: with ps; [ pg8000 psycopg2 ]);
|
||||
process = (ps: []);
|
||||
postgres = (ps: with ps; [ pg8000 psycopg2 semver ]);
|
||||
process = (ps: [ ps.psutil]);
|
||||
};
|
||||
|
||||
# All integrations (default + extra):
|
||||
|
|
Loading…
Reference in a new issue