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
73
74
75
76
|
{ lib
, boto3
, botocore
, buildPythonPackage
, dateparser
, fetchFromGitHub
, matplotlib
, numpy
, pandas
, poetry-core
, prometheus-api-client
, pydantic
, pythonRelaxDepsHook
, requests
}:
buildPythonPackage rec {
pname = "prometrix";
version = "0.1.18-unstable-2024-04-30";
pyproject = true;
src = fetchFromGitHub {
owner = "robusta-dev";
repo = "prometrix";
# https://github.com/robusta-dev/prometrix/issues/19
rev = "35128847d46016b88455e0a98f0eeec08d042107";
hash = "sha256-g8ZqgL9ETVwpKLMQS7s7A4GpSGfaFEDLOr8JBvFl2C4=";
};
pythonRelaxDeps = [
"pydantic"
"urllib3"
];
build-system = [
poetry-core
];
nativeBuildInputs = [
pythonRelaxDepsHook
];
dependencies = [
boto3
botocore
dateparser
matplotlib
numpy
pandas
prometheus-api-client
pydantic
requests
];
# Fixture is missing
# https://github.com/robusta-dev/prometrix/issues/9
doCheck = false;
pythonImportsCheck = [
"prometrix"
];
meta = with lib; {
description = "Unified Prometheus client";
longDescription = ''
This Python package provides a unified Prometheus client that can be used
to connect to and query various types of Prometheus instances.
'';
homepage = "https://github.com/robusta-dev/prometrix";
license = licenses.mit;
maintainers = with maintainers; [ azahi ];
# prometheus-api-client 0.5.5 is not working
# https://github.com/robusta-dev/prometrix/issues/14
broken = versionAtLeast prometheus-api-client.version "0.5.3";
};
}
|