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
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# ihatemoney is not really a library. It will only ever be imported
|
|
|
|
# by the interpreter of uwsgi. So overrides for its depencies are fine.
|
|
|
|
let
|
2021-10-14 00:43:12 +00:00
|
|
|
# sqlalchemy-continuum requires sqlalchemy < 1.4
|
|
|
|
pinned_sqlalchemy = sqlalchemy.overridePythonAttrs (
|
|
|
|
old: rec {
|
|
|
|
pname = "SQLAlchemy";
|
|
|
|
version = "1.3.24";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "06bmxzssc66cblk1hamskyv5q3xf1nh1py3vi6dka4lkpxy7gfzb";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2020-07-18 16:06:22 +00:00
|
|
|
in
|
|
|
|
|
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
|
2021-10-14 00:43:12 +00:00
|
|
|
(
|
|
|
|
flask_migrate.override {
|
|
|
|
flask_sqlalchemy = flask_sqlalchemy.override {
|
|
|
|
sqlalchemy = pinned_sqlalchemy;
|
|
|
|
};
|
|
|
|
alembic = alembic.override {
|
|
|
|
sqlalchemy = pinned_sqlalchemy;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|
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
|
2021-10-14 00:43:12 +00:00
|
|
|
(
|
|
|
|
(
|
|
|
|
sqlalchemy-continuum.override {
|
|
|
|
sqlalchemy = pinned_sqlalchemy;
|
|
|
|
sqlalchemy-utils = sqlalchemy-utils.override {
|
|
|
|
sqlalchemy = pinned_sqlalchemy;
|
|
|
|
};
|
|
|
|
sqlalchemy-i18n = sqlalchemy-i18n.override {
|
|
|
|
sqlalchemy = pinned_sqlalchemy;
|
|
|
|
sqlalchemy-utils = sqlalchemy-utils.override {
|
|
|
|
sqlalchemy = pinned_sqlalchemy;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
flask_sqlalchemy = flask_sqlalchemy.override {
|
|
|
|
sqlalchemy = pinned_sqlalchemy;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
).overridePythonAttrs (
|
|
|
|
old: {
|
|
|
|
doCheck = false;
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
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
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# upstream performed the update without needing to patch the code
|
|
|
|
# the original patch does not apply, sadly
|
|
|
|
# https://github.com/spiral-project/ihatemoney/pull/912
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace "Flask-WTF>=0.14.3,<1" "Flask-WTF>=0.14.3,<2"
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|