1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, sphinx
5, setuptools-scm
6, django
7, redis
8, celery
9, pytest-django
10, pytestCheckHook
11, mock
12, gitMinimal }:
13
14buildPythonPackage rec {
15 pname = "django-health-check";
16 version = "3.16.5";
17
18 src = fetchFromGitHub {
19 owner = "KristianOellegaard";
20 repo = pname;
21 rev = version;
22 hash = "sha256-Jfzi+o4ja2sNCSPfX9eRq3WGid1gcfehhayAD1L4f2U=";
23 leaveDotGit = true;
24 };
25
26 buildInputs = [
27 sphinx
28 django
29 ];
30
31 nativeBuildInputs = [
32 setuptools-scm
33 gitMinimal
34 ];
35
36 checkInputs = [
37 pytest-django
38 pytestCheckHook
39 mock
40 celery
41 redis
42 ];
43
44 postPatch = ''
45 # We don't want to generate coverage
46 substituteInPlace setup.cfg \
47 --replace "pytest-runner" "" \
48 --replace "--cov=health_check" "" \
49 --replace "--cov-report=term" "" \
50 --replace "--cov-report=xml" ""
51 '';
52
53 pythonImportsCheck = [ "health_check" ];
54
55 meta = with lib; {
56 description = "Pluggable app that runs a full check on the deployment";
57 homepage = "https://github.com/KristianOellegaard/django-health-check";
58 license = licenses.mit;
59 maintainers = with maintainers; [ onny ];
60 };
61}