2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, apispec
|
|
|
|
, colorama
|
|
|
|
, click
|
2021-02-05 17:12:51 +00:00
|
|
|
, email_validator
|
2021-05-20 23:08:51 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, flask
|
|
|
|
, flask-babel
|
|
|
|
, flask_login
|
|
|
|
, flask-openid
|
|
|
|
, flask_sqlalchemy
|
|
|
|
, flask_wtf
|
|
|
|
, flask-jwt-extended
|
|
|
|
, jsonschema
|
|
|
|
, marshmallow
|
|
|
|
, marshmallow-enum
|
|
|
|
, marshmallow-sqlalchemy
|
|
|
|
, python-dateutil
|
|
|
|
, prison
|
|
|
|
, pyjwt
|
2021-05-20 23:08:51 +00:00
|
|
|
, pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
, sqlalchemy-utils
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flask-appbuilder";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "3.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "Flask-AppBuilder";
|
|
|
|
inherit version;
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "00dsfv1apl6483wy20aj91f9h5ak2casbx5vcajv2nd3i7c7v8gx";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/dpgaspar/Flask-AppBuilder/pull/1610
|
|
|
|
(fetchpatch {
|
|
|
|
name = "flask_jwt_extended-and-pyjwt-patch";
|
|
|
|
url = "https://github.com/dpgaspar/Flask-AppBuilder/commit/7097a7b133f27c78d2b54d2a46e4a4c24478a066.patch";
|
|
|
|
sha256 = "sha256-ZpY8+2Hoz3z01GVtw2OIbQcsmAwa7iwilFWzgcGhY1w=";
|
|
|
|
includes = [ "flask_appbuilder/security/manager.py" "setup.py" ];
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
apispec
|
|
|
|
colorama
|
|
|
|
click
|
2021-02-05 17:12:51 +00:00
|
|
|
email_validator
|
2020-04-24 23:36:52 +00:00
|
|
|
flask
|
|
|
|
flask-babel
|
|
|
|
flask_login
|
|
|
|
flask-openid
|
|
|
|
flask_sqlalchemy
|
|
|
|
flask_wtf
|
|
|
|
flask-jwt-extended
|
|
|
|
jsonschema
|
|
|
|
marshmallow
|
|
|
|
marshmallow-enum
|
|
|
|
marshmallow-sqlalchemy
|
|
|
|
python-dateutil
|
|
|
|
prison
|
|
|
|
pyjwt
|
2021-05-20 23:08:51 +00:00
|
|
|
pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
sqlalchemy-utils
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2021-05-20 23:08:51 +00:00
|
|
|
--replace "apispec[yaml]>=3.3, <4" "apispec[yaml] >=3.3, <5" \
|
|
|
|
--replace "Flask-Login>=0.3, <0.5" "Flask-Login >=0.3, <0.6" \
|
|
|
|
--replace "Flask-Babel>=1, <2" "Flask-Babel >=1, <3" \
|
|
|
|
--replace "marshmallow-sqlalchemy>=0.22.0, <0.24.0" "marshmallow-sqlalchemy >=0.22.0, <0.25.0"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# Majority of tests require network access or mongo
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [ "flask_appbuilder" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple and rapid application development framework, built on top of Flask";
|
|
|
|
homepage = "https://github.com/dpgaspar/flask-appbuilder/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ costrouc ];
|
|
|
|
};
|
|
|
|
}
|