2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, prometheus-client
|
|
|
|
, pytest-django
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-prometheus";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2.3.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "korfuri";
|
|
|
|
repo = pname;
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-JiLH+4mmNdb9BN81J5YFiMPna/3gaKUK6ARjmCa3fE8=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./drop-untestable-database-backends.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner"' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
prometheus-client
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"django_prometheus"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytest-django
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/korfuri/django-prometheus/releases/tag/v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Django middlewares to monitor your application with Prometheus.io";
|
|
|
|
homepage = "https://github.com/korfuri/django-prometheus";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|