Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / django-login-required-middleware / default.nix
blobb288e79290599331301ac5d9773bbf4768fd83eb
1 { lib
2 , buildPythonPackage
3 , django
4 , djangorestframework
5 , fetchFromGitHub
6 , python
7 , setuptools-scm
8 }:
10 buildPythonPackage rec {
11   pname = "django-login-required-middleware";
12   version = "0.9.0";
13   format = "pyproject";
15   src = fetchFromGitHub {
16     owner = "CleitonDeLima";
17     repo = pname;
18     rev = "refs/tags/${version}";
19     hash = "sha256-WFQ/JvKh6gkUxPV27QBd2TzwFS8hfQGmcTInTnmh6iA=";
20   };
22   nativeBuildInputs = [
23     setuptools-scm
24   ];
26   propagatedBuildInputs = [
27     django
28   ];
30   checkInputs = [
31     djangorestframework
32   ];
34   pythonImportsCheck = [
35     "login_required"
36   ];
38   checkPhase = ''
39     ${python.interpreter} -m django test --settings tests.settings
40   '';
42   meta = with lib; {
43     description = "Requires login to all requests through middleware in Django";
44     homepage = "https://github.com/CleitonDeLima/django-login-required-middleware";
45     license = licenses.mit;
46     maintainers = with maintainers; [ onny ];
47   };