2021-10-14 00:43:12 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, lib
|
|
|
|
, isPy27
|
|
|
|
, nixosTests
|
|
|
|
, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, alembic
|
|
|
|
, aniso8601
|
|
|
|
, Babel
|
|
|
|
, blinker
|
2021-12-06 16:07:01 +00:00
|
|
|
, cachetools
|
2020-04-24 23:36:52 +00:00
|
|
|
, click
|
|
|
|
, dnspython
|
|
|
|
, email_validator
|
|
|
|
, flask
|
|
|
|
, flask-babel
|
|
|
|
, flask-cors
|
|
|
|
, flask_mail
|
|
|
|
, flask_migrate
|
|
|
|
, flask-restful
|
|
|
|
, flask_sqlalchemy
|
2021-12-06 16:07:01 +00:00
|
|
|
, flask-talisman
|
2020-04-24 23:36:52 +00:00
|
|
|
, flask_wtf
|
2020-07-18 16:06:22 +00:00
|
|
|
, debts
|
2020-04-24 23:36:52 +00:00
|
|
|
, idna
|
|
|
|
, itsdangerous
|
|
|
|
, jinja2
|
|
|
|
, Mako
|
|
|
|
, markupsafe
|
|
|
|
, python-dateutil
|
|
|
|
, pytz
|
2021-12-06 16:07:01 +00:00
|
|
|
, requests
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
|
|
|
, sqlalchemy
|
2021-10-14 00:43:12 +00:00
|
|
|
, sqlalchemy-utils
|
2020-07-18 16:06:22 +00:00
|
|
|
, sqlalchemy-continuum
|
2021-10-14 00:43:12 +00:00
|
|
|
, sqlalchemy-i18n
|
2020-04-24 23:36:52 +00:00
|
|
|
, werkzeug
|
|
|
|
, wtforms
|
|
|
|
, psycopg2 # optional, for postgresql support
|
|
|
|
, flask_testing
|
2020-09-25 04:45:31 +00:00
|
|
|
, pytestCheckHook
|
2022-01-25 03:21:06 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ihatemoney";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "5.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0gsqba9qbs1dpmfys8qpiahy4pbn4khcc6mgmdnhssmkjsb94sx6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aniso8601
|
|
|
|
Babel
|
|
|
|
blinker
|
2021-12-06 16:07:01 +00:00
|
|
|
cachetools
|
2020-04-24 23:36:52 +00:00
|
|
|
click
|
|
|
|
dnspython
|
|
|
|
email_validator
|
|
|
|
flask
|
|
|
|
flask-babel
|
|
|
|
flask-cors
|
|
|
|
flask_mail
|
2022-01-25 03:21:06 +00:00
|
|
|
flask_migrate
|
2020-04-24 23:36:52 +00:00
|
|
|
flask-restful
|
2021-12-06 16:07:01 +00:00
|
|
|
flask-talisman
|
|
|
|
flask_wtf
|
2020-04-24 23:36:52 +00:00
|
|
|
idna
|
|
|
|
itsdangerous
|
|
|
|
jinja2
|
|
|
|
Mako
|
|
|
|
markupsafe
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
2021-12-06 16:07:01 +00:00
|
|
|
requests
|
2020-04-24 23:36:52 +00:00
|
|
|
six
|
2022-01-25 03:21:06 +00:00
|
|
|
sqlalchemy-continuum
|
2020-04-24 23:36:52 +00:00
|
|
|
werkzeug
|
2021-12-06 16:07:01 +00:00
|
|
|
wtforms
|
2020-04-24 23:36:52 +00:00
|
|
|
psycopg2
|
2020-07-18 16:06:22 +00:00
|
|
|
debts
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-01-25 03:21:06 +00:00
|
|
|
patches = [
|
|
|
|
# fix build with wtforms 3. remove with next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/spiral-project/ihatemoney/commit/40ce32d9fa58a60d26a4d0df547b8deb709c330d.patch";
|
|
|
|
sha256 = "sha256-2ewOu21qhq/AOZaE9qrF5J6HH0h6ohFgjDb+BYjJnuQ=";
|
|
|
|
excludes = [ "setup.cfg" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
2022-01-25 03:21:06 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "Flask-WTF>=0.14.3,<1" "Flask-WTF>=0.14.3,<2" \
|
|
|
|
--replace "SQLAlchemy>=1.3.0,<1.4" "SQLAlchemy>=1.3.0,<1.5" \
|
|
|
|
--replace "WTForms>=2.3.1,<2.4" "WTForms"
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [
|
2021-10-14 00:43:12 +00:00
|
|
|
flask_testing
|
|
|
|
pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2022-01-25 03:21:06 +00:00
|
|
|
pythonImportChecks = [ "ihatemoney" ];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_notifications" # requires running service.
|
|
|
|
"test_invite" # requires running service.
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_invitation_email_failure" # requires dns resolution
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
passthru.tests = {
|
2020-09-25 04:45:31 +00:00
|
|
|
inherit (nixosTests.ihatemoney) ihatemoney-postgresql ihatemoney-sqlite;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://ihatemoney.org";
|
|
|
|
description = "A simple shared budget manager web application";
|
|
|
|
license = licenses.beerware;
|
|
|
|
maintainers = [ maintainers.symphorien ];
|
|
|
|
};
|
|
|
|
}
|