1{ 2 lib, 3 buildPythonPackage, 4 django, 5 djangorestframework, 6 fetchFromGitHub, 7 python, 8 setuptools-scm, 9}: 10 11buildPythonPackage rec { 12 pname = "django-login-required-middleware"; 13 version = "0.9.0"; 14 format = "pyproject"; 15 16 src = fetchFromGitHub { 17 owner = "CleitonDeLima"; 18 repo = "django-login-required-middleware"; 19 tag = version; 20 hash = "sha256-WFQ/JvKh6gkUxPV27QBd2TzwFS8hfQGmcTInTnmh6iA="; 21 }; 22 23 nativeBuildInputs = [ setuptools-scm ]; 24 25 propagatedBuildInputs = [ django ]; 26 27 checkInputs = [ djangorestframework ]; 28 29 pythonImportsCheck = [ "login_required" ]; 30 31 checkPhase = '' 32 ${python.interpreter} -m django test --settings tests.settings 33 ''; 34 35 meta = with lib; { 36 description = "Requires login to all requests through middleware in Django"; 37 homepage = "https://github.com/CleitonDeLima/django-login-required-middleware"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ onny ]; 40 }; 41}