-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathddtrace.nix
72 lines (60 loc) · 1.49 KB
/
ddtrace.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
python,
pkgs,
ddsketch,
...
}:
let
envier = python.pkgs.buildPythonPackage rec {
pname = "envier";
version = "0.5.2";
pyproject = true;
propagatedBuildInputs = with python.pkgs; [
hatchling
hatch-vcs
];
src = pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-Tn45jLCajdNgUI734SURoVI1VCbSVEuEh6NNrSfMIK0=";
};
};
ddtrace = python.pkgs.buildPythonPackage rec {
pname = "ddtrace";
version = "2.9.2";
pyproject = true;
nativeBuildInputs =
[ pkgs.cmake ]
++ (with python.pkgs; [
cmake
setuptools
setuptools_scm
cython
]);
propagatedBuildInputs = with python.pkgs; [
attrs
cattrs
ddsketch
envier
opentelemetry-api
protobuf
six
xmltodict
bytecode
];
buildInputs = pkgs.lib.optionals pkgs.stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.IOKit ];
postPatch = ''
substituteInPlace setup.py --replace "cmake>=3.24.2,<3.28" "cmake"
# downloading artifacts is impossible in sandboxed build
substituteInPlace setup.py --replace "cls.download_artifacts()" "pass"
substituteInPlace pyproject.toml --replace "cmake>=3.24.2,<3.28" "cmake"
'';
dontUseCmakeConfigure = true;
src = pkgs.fetchFromGitHub {
owner = "datadog";
repo = "dd-trace-py";
rev = "refs/tags/v${version}";
hash = "sha256-Ax220/uBNwSZNBFYxbxAe0rmLrqYYf3a8K/PIuSE150=";
};
};
in
(ddtrace)