Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / flask-security-too / default.nix
blob81abf369a8a41a93d867d16047aa8d7fe632f0af
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , pythonOlder
5 , setuptools
7 # extras: babel
8 , babel
9 , flask-babel
11 # extras: common
12 , bcrypt
13 , bleach
14 , flask-mailman
16 # extras: fsqla
17 , flask-sqlalchemy
18 , sqlalchemy
19 , sqlalchemy-utils
21 # extras: mfa
22 , cryptography
23 , phonenumbers
24 , webauthn
25 , qrcode
27 # propagates
28 , email-validator
29 , flask
30 , flask-login
31 , flask-principal
32 , flask-wtf
33 , passlib
34 , importlib-resources
35 , wtforms
37 # tests
38 , argon2-cffi
39 , mongoengine
40 , mongomock
41 , peewee
42 , pony
43 , pytestCheckHook
44 , python-dateutil
45 , zxcvbn
48 buildPythonPackage rec {
49   pname = "flask-security-too";
50   version = "5.3.2";
51   pyproject = true;
53   disabled = pythonOlder "3.7";
55   src = fetchPypi {
56     pname = "Flask-Security-Too";
57     inherit version;
58     hash = "sha256-wLUHXfDWSp7zWwTIjTH79AWlkkNzb21tChpLSEWr8+U=";
59   };
61   nativeBuildInputs = [
62     setuptools
63   ];
65   propagatedBuildInputs = [
66     email-validator
67     flask
68     flask-login
69     flask-principal
70     flask-wtf
71     passlib
72     importlib-resources
73     wtforms
74   ];
76   passthru.optional-dependencies = {
77     babel = [
78       babel
79       flask-babel
80     ];
81     common = [
82       bcrypt
83       bleach
84       flask-mailman
85     ];
86     fsqla = [
87       flask-sqlalchemy
88       sqlalchemy
89       sqlalchemy-utils
90     ];
91     mfa = [
92       cryptography
93       phonenumbers
94       webauthn
95       qrcode
96     ];
97   };
99   nativeCheckInputs = [
100     argon2-cffi
101     mongoengine
102     mongomock
103     peewee
104     pony
105     pytestCheckHook
106     python-dateutil
107     zxcvbn
108   ]
109   ++ passthru.optional-dependencies.babel
110   ++ passthru.optional-dependencies.common
111   ++ passthru.optional-dependencies.fsqla
112   ++ passthru.optional-dependencies.mfa;
115   disabledTests = [
116     # needs /etc/resolv.conf
117     "test_login_email_whatever"
118   ];
120   pythonImportsCheck = [
121     "flask_security"
122   ];
124   meta = with lib; {
125     changelog = "https://github.com/Flask-Middleware/flask-security/blob/${version}/CHANGES.rst";
126     homepage = "https://github.com/Flask-Middleware/flask-security";
127     description = "Simple security for Flask apps (fork)";
128     license = licenses.mit;
129     maintainers = with maintainers; [ gador ];
130   };