2020-06-25 13:00:00 +01:00
|
|
|
{ buildPythonPackage, lib, fetchFromGitHub, isPy27, nixosTests, fetchpatch, fetchPypi
|
2019-09-16 16:08:32 +01:00
|
|
|
, alembic
|
|
|
|
, aniso8601
|
|
|
|
, Babel
|
|
|
|
, blinker
|
|
|
|
, click
|
|
|
|
, dnspython
|
|
|
|
, email_validator
|
|
|
|
, flask
|
|
|
|
, flask-babel
|
|
|
|
, flask-cors
|
|
|
|
, flask_mail
|
|
|
|
, flask_migrate
|
|
|
|
, flask-restful
|
|
|
|
, flask_script
|
|
|
|
, flask_sqlalchemy
|
|
|
|
, flask_wtf
|
2020-04-24 13:00:00 +01:00
|
|
|
, debts
|
2019-09-16 16:08:32 +01:00
|
|
|
, idna
|
|
|
|
, itsdangerous
|
|
|
|
, jinja2
|
|
|
|
, Mako
|
|
|
|
, markupsafe
|
|
|
|
, python-dateutil
|
|
|
|
, pytz
|
|
|
|
, six
|
|
|
|
, sqlalchemy
|
2020-04-24 13:00:00 +01:00
|
|
|
, sqlalchemy-continuum
|
2019-09-16 16:08:32 +01:00
|
|
|
, werkzeug
|
|
|
|
, wtforms
|
|
|
|
, psycopg2 # optional, for postgresql support
|
|
|
|
, flask_testing
|
|
|
|
}:
|
|
|
|
|
2020-06-25 13:00:00 +01: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
|
|
|
|
# https://github.com/spiral-project/ihatemoney/issues/567
|
|
|
|
pinned_wtforms = wtforms.overridePythonAttrs (old: rec {
|
|
|
|
pname = "WTForms";
|
|
|
|
version = "2.2.1";
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0q9vkcq6jnnn618h27lx9sas6s9qlg2mv8ja6dn0hy38gwzarnqc";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
pinned_flask_wtf = flask_wtf.override { wtforms = pinned_wtforms; };
|
|
|
|
in
|
|
|
|
|
2019-09-16 16:08:32 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ihatemoney";
|
2020-04-24 13:00:00 +01:00
|
|
|
version = "4.2";
|
2019-09-16 16:08:32 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spiral-project";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-04-24 13:00:00 +01:00
|
|
|
sha256 = "0d4vc6m0jkwlz9ly0hcjghccydvqbldh2jb8yzf94jrgkd5fd7k1";
|
2019-09-16 16:08:32 +01:00
|
|
|
};
|
|
|
|
|
2020-04-25 13:00:00 +01:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2020-04-25 13:00:00 +01:00
|
|
|
patches = [
|
|
|
|
# fix migration on postgresql
|
|
|
|
# remove on next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/spiral-project/ihatemoney/commit/6129191b26784b895e203fa3eafb89cee7d88b71.patch";
|
|
|
|
sha256 = "0yc24gsih9x3pnh2mhj4v5i71x02dq93a9jd2r8b1limhcl4p1sw";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-04-24 13:00:00 +01:00
|
|
|
# remove draconian pinning
|
|
|
|
sed -i 's/==.*$//' setup.cfg
|
|
|
|
'';
|
|
|
|
|
2019-09-16 16:08:32 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
alembic
|
|
|
|
aniso8601
|
|
|
|
Babel
|
|
|
|
blinker
|
|
|
|
click
|
|
|
|
dnspython
|
|
|
|
email_validator
|
|
|
|
flask
|
|
|
|
flask-babel
|
|
|
|
flask-cors
|
|
|
|
flask_mail
|
|
|
|
flask_migrate
|
|
|
|
flask-restful
|
|
|
|
flask_script
|
|
|
|
flask_sqlalchemy
|
2020-06-25 13:00:00 +01:00
|
|
|
pinned_flask_wtf
|
2019-09-16 16:08:32 +01:00
|
|
|
idna
|
|
|
|
itsdangerous
|
|
|
|
jinja2
|
|
|
|
Mako
|
|
|
|
markupsafe
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
six
|
|
|
|
sqlalchemy
|
2020-04-24 13:00:00 +01:00
|
|
|
sqlalchemy-continuum
|
2019-09-16 16:08:32 +01:00
|
|
|
werkzeug
|
2020-06-25 13:00:00 +01:00
|
|
|
pinned_wtforms
|
2019-09-16 16:08:32 +01:00
|
|
|
psycopg2
|
2020-04-24 13:00:00 +01:00
|
|
|
debts
|
2019-09-16 16:08:32 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
flask_testing
|
2020-04-25 13:00:00 +01:00
|
|
|
];
|
2019-09-16 16:08:32 +01:00
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) ihatemoney;
|
|
|
|
};
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://ihatemoney.org";
|
|
|
|
description = "A simple shared budget manager web application";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.beerware;
|
|
|
|
maintainers = [ maintainers.symphorien ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|