lol

python310Packages.django-maintenance-mode: fix build

It can't be tested using pythonImportsCheck because it can't be imported
without being inside of a Django app.

+16 -7
+16 -7
pkgs/development/python-modules/django-maintenance-mode/default.nix
··· 1 1 { lib 2 2 , fetchFromGitHub 3 + , fetchpatch 3 4 , buildPythonPackage 4 - , pytest 5 5 , django 6 6 , python-fsutil 7 + , python 7 8 , pythonOlder 8 9 }: 9 10 ··· 21 22 hash = "sha256-Mcj8O20hCINGf5T3PCG9jq0onSrm4R+Ke5CLMqMDmuU="; 22 23 }; 23 24 25 + patches = [ 26 + (fetchpatch { 27 + name = "fix-broken-test.patch"; 28 + url = "https://github.com/fabiocaccamo/django-maintenance-mode/commit/68cde8d9ceef00eeaa2068f420698c1c562fa9fc.patch"; 29 + hash = "sha256-K/zYYkcnmWGc7Knz4l9PgvUtT0IccPRXc3UFriC1ldc="; 30 + }) 31 + ]; 32 + 24 33 propagatedBuildInputs = [ 25 34 django 26 35 python-fsutil 27 36 ]; 28 37 29 - nativeCheckInputs = [ 30 - pytest 31 - ]; 38 + checkPhase = '' 39 + runHook preCheck 40 + 41 + ${python.interpreter} runtests.py 32 42 33 - pythonImportsCheck = [ 34 - "maintenance_mode" 35 - ]; 43 + runHook postCheck 44 + ''; 36 45 37 46 meta = with lib; { 38 47 description = "Shows a 503 error page when maintenance-mode is on";