2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, 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
|
2022-02-20 05:27:41 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, 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";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "3.4.4";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "Flask-AppBuilder";
|
|
|
|
inherit version;
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-uZzuvNusqMzAS/vmg3CuZ+D442J4LbFwsBboVIx/srE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
# See here: https://github.com/dpgaspar/Flask-AppBuilder/commit/7097a7b133f27c78d2b54d2a46e4a4c24478a066.patch
|
|
|
|
# https://github.com/dpgaspar/Flask-AppBuilder/pull/1610
|
|
|
|
# The patch from the PR doesn't apply cleanly so I edited it manually.
|
2022-02-10 20:34:41 +00:00
|
|
|
patches = [
|
|
|
|
./upgrade-to-flask_jwt_extended-4.patch
|
|
|
|
(fetchpatch {
|
|
|
|
# https://github.com/dpgaspar/Flask-AppBuilder/pull/1734
|
|
|
|
name = "flask-appbuilder-wtf3.patch";
|
|
|
|
url = "https://github.com/dpgaspar/Flask-AppBuilder/commit/bccb3d719cd3ceb872fe74a9ab304d74664fbf43.patch";
|
|
|
|
sha256 = "1rsci0ynb7y6k53j164faggjr2g6l5v78w7953qbxcy8f55sb2fv";
|
|
|
|
excludes = [
|
|
|
|
"requirements.txt"
|
|
|
|
"setup.py"
|
|
|
|
"examples/employees/app/views.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-10-01 09:20:50 +00:00
|
|
|
--replace "apispec[yaml]>=3.3, <4" "apispec[yaml] >=3.3" \
|
2021-07-14 22:03:04 +00:00
|
|
|
--replace "Flask>=0.12, <2" "Flask" \
|
2021-05-20 23:08:51 +00:00
|
|
|
--replace "Flask-Login>=0.3, <0.5" "Flask-Login >=0.3, <0.6" \
|
|
|
|
--replace "Flask-Babel>=1, <2" "Flask-Babel >=1, <3" \
|
2021-07-14 22:03:04 +00:00
|
|
|
--replace "Flask-WTF>=0.14.2, <0.15.0" "Flask-WTF" \
|
2022-02-10 20:34:41 +00:00
|
|
|
--replace "WTForms<3.0.0" "WTForms" \
|
2022-02-20 05:27:41 +00:00
|
|
|
--replace "marshmallow-sqlalchemy>=0.22.0, <0.27.0" "marshmallow-sqlalchemy" \
|
2021-07-14 22:03:04 +00:00
|
|
|
--replace "Flask-JWT-Extended>=3.18, <4" "Flask-JWT-Extended>=4.1.0" \
|
|
|
|
--replace "PyJWT>=1.7.1, <2.0.0" "PyJWT>=2.0.1" \
|
2021-10-01 09:20:50 +00:00
|
|
|
--replace "prison>=0.2.1, <1.0.0" "prison" \
|
2021-07-14 22:03:04 +00:00
|
|
|
--replace "SQLAlchemy<1.4.0" "SQLAlchemy"
|
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;
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"flask_appbuilder"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-02-20 05:27:41 +00:00
|
|
|
description = "Application development framework, built on top of Flask";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/dpgaspar/flask-appbuilder/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ costrouc ];
|
|
|
|
};
|
|
|
|
}
|