evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / django-prometheus / default.nix
blobe15174d56ae42ad5f17b17d90f6ee68efdcfd2d6
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   prometheus-client,
7   pytest-django,
8   pytestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "django-prometheus";
13   version = "2.3.1";
14   format = "setuptools";
15   disabled = pythonOlder "3.6";
17   src = fetchFromGitHub {
18     owner = "korfuri";
19     repo = pname;
20     rev = "v${version}";
21     hash = "sha256-JiLH+4mmNdb9BN81J5YFiMPna/3gaKUK6ARjmCa3fE8=";
22   };
24   patches = [ ./drop-untestable-database-backends.patch ];
26   postPatch = ''
27     substituteInPlace setup.py \
28       --replace '"pytest-runner"' ""
29   '';
31   propagatedBuildInputs = [ prometheus-client ];
33   pythonImportsCheck = [ "django_prometheus" ];
35   nativeCheckInputs = [
36     pytest-django
37     pytestCheckHook
38   ];
40   meta = with lib; {
41     changelog = "https://github.com/korfuri/django-prometheus/releases/tag/v${version}";
42     description = "Django middlewares to monitor your application with Prometheus.io";
43     homepage = "https://github.com/korfuri/django-prometheus";
44     license = licenses.asl20;
45     maintainers = with maintainers; [ hexa ];
46   };