nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 django,
5 fetchFromGitHub,
6 python,
7 python-fsutil,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "django-maintenance-mode";
13 version = "0.22.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "fabiocaccamo";
18 repo = "django-maintenance-mode";
19 tag = version;
20 hash = "sha256-Gd6Bmir0bHsD7Xaq1N9S8bSMGQWbVCBIA8Cftzu6QB0=";
21 };
22
23 nativeBuildInputs = [ setuptools ];
24
25 propagatedBuildInputs = [
26 django
27 python-fsutil
28 ];
29
30 checkPhase = ''
31 runHook preCheck
32
33 ${python.interpreter} runtests.py
34
35 runHook postCheck
36 '';
37
38 pythonImportsCheck = [ "maintenance_mode" ];
39
40 meta = {
41 description = "Shows a 503 error page when maintenance-mode is on";
42 homepage = "https://github.com/fabiocaccamo/django-maintenance-mode";
43 changelog = "https://github.com/fabiocaccamo/django-maintenance-mode/releases/tag/${src.tag}";
44 license = lib.licenses.bsd3;
45 maintainers = with lib.maintainers; [ mrmebelman ];
46 };
47}