Files
nixpkgs/pkgs/development/python-modules/django-maintenance-mode/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

51 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
django,
fetchFromGitHub,
python,
python-fsutil,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "django-maintenance-mode";
version = "0.22.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "fabiocaccamo";
repo = "django-maintenance-mode";
tag = version;
hash = "sha256-Gd6Bmir0bHsD7Xaq1N9S8bSMGQWbVCBIA8Cftzu6QB0=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
django
python-fsutil
];
checkPhase = ''
runHook preCheck
${python.interpreter} runtests.py
runHook postCheck
'';
pythonImportsCheck = [ "maintenance_mode" ];
meta = {
description = "Shows a 503 error page when maintenance-mode is on";
homepage = "https://github.com/fabiocaccamo/django-maintenance-mode";
changelog = "https://github.com/fabiocaccamo/django-maintenance-mode/releases/tag/${src.tag}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ mrmebelman ];
};
}