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