2021-08-27 14:25:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
|
|
|
, twisted
|
2021-08-27 14:25:00 +00:00
|
|
|
, pytestCheckHook
|
2021-12-30 13:39:12 +00:00
|
|
|
, pythonOlder
|
2021-08-27 14:25:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "prometheus-client";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.20.0";
|
|
|
|
pyproject = true;
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-08-27 14:25:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "prometheus";
|
|
|
|
repo = "client_python";
|
2022-11-04 12:27:35 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-IMw0mpOUzjXBy4bMTeSFMc5pdibI5lGxZHKiufjPLbM=";
|
2021-08-27 14:25:00 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
optional-dependencies.twisted = [
|
|
|
|
twisted
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-27 14:25:00 +00:00
|
|
|
pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
]
|
|
|
|
++ lib.flatten (lib.attrValues optional-dependencies);
|
2021-08-27 14:25:00 +00:00
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"prometheus_client"
|
|
|
|
];
|
2021-08-27 14:25:00 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Prometheus instrumentation library for Python applications";
|
|
|
|
homepage = "https://github.com/prometheus/client_python";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/prometheus/client_python/releases/tag/v${version}";
|
2021-08-27 14:25:00 +00:00
|
|
|
license = licenses.asl20;
|
2021-12-30 13:39:12 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-08-27 14:25:00 +00:00
|
|
|
};
|
|
|
|
}
|