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