git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #156350 from symphorien/ihm-unbreak-once-again
commit39ea4300929dad60dd283a4c9847763495d8fa89 authorSandro <sandro.jaeckel@gmail.com> dateMon 24 Jan 2022, 00:55 (5 years ago) parent098457e177f8ca
2 files changed+20−58
pkgs/development/python-modules/ihatemoney/default.nix+18−54 pkgs/development/python-modules/sqlalchemy-continuum/default.nix+2−4
pkgs/development/python-modules/ihatemoney/default.nix+18−54
@@ -39,25 +39,9 @@
3939, psycopg2 # optional, for postgresql support
4040, flask_testing
4141, pytestCheckHook
42+, fetchpatch
4243}:
4344
44−# ihatemoney is not really a library. It will only ever be imported
45−# by the interpreter of uwsgi. So overrides for its depencies are fine.
46−let
47− # sqlalchemy-continuum requires sqlalchemy < 1.4
48− pinned_sqlalchemy = sqlalchemy.overridePythonAttrs (
49− old: rec {
50− pname = "SQLAlchemy";
51− version = "1.3.24";
52−
53− src = fetchPypi {
54− inherit pname version;
55− sha256 = "06bmxzssc66cblk1hamskyv5q3xf1nh1py3vi6dka4lkpxy7gfzb";
56− };
57− }
58− );
59−in
60−
6145buildPythonPackage rec {
6246 pname = "ihatemoney";
6347 version = "5.1.1";
@@ -81,16 +65,7 @@ buildPythonPackage rec {
8165 flask-babel
8266 flask-cors
8367 flask_mail
84− (
85− flask_migrate.override {
86− flask_sqlalchemy = flask_sqlalchemy.override {
87− sqlalchemy = pinned_sqlalchemy;
88− };
89− alembic = alembic.override {
90− sqlalchemy = pinned_sqlalchemy;
91− };
92− }
93− )
68+ flask_migrate
9469 flask-restful
9570 flask-talisman
9671 flask_wtf
@@ -103,40 +78,27 @@ buildPythonPackage rec {
10378 pytz
10479 requests
10580 six
106− (
107− (
108− sqlalchemy-continuum.override {
109− sqlalchemy = pinned_sqlalchemy;
110− sqlalchemy-utils = sqlalchemy-utils.override {
111− sqlalchemy = pinned_sqlalchemy;
112− };
113− sqlalchemy-i18n = sqlalchemy-i18n.override {
114− sqlalchemy = pinned_sqlalchemy;
115− sqlalchemy-utils = sqlalchemy-utils.override {
116− sqlalchemy = pinned_sqlalchemy;
117− };
118− };
119− flask_sqlalchemy = flask_sqlalchemy.override {
120− sqlalchemy = pinned_sqlalchemy;
121− };
122− }
123− ).overridePythonAttrs (
124− old: {
125− doCheck = false;
126− }
127− )
128− )
81+ sqlalchemy-continuum
12982 werkzeug
13083 wtforms
13184 psycopg2
13285 debts
13386 ];
13487
135− # upstream performed the update without needing to patch the code
136− # the original patch does not apply, sadly
137− # https://github.com/spiral-project/ihatemoney/pull/912
88+ patches = [
89+ # fix build with wtforms 3. remove with next release
90+ (fetchpatch {
91+ url = "https://github.com/spiral-project/ihatemoney/commit/40ce32d9fa58a60d26a4d0df547b8deb709c330d.patch";
92+ sha256 = "sha256-2ewOu21qhq/AOZaE9qrF5J6HH0h6ohFgjDb+BYjJnuQ=";
93+ excludes = [ "setup.cfg" ];
94+ })
95+ ];
96+
13897 postPatch = ''
139− substituteInPlace setup.cfg --replace "Flask-WTF>=0.14.3,<1" "Flask-WTF>=0.14.3,<2"
98+ substituteInPlace setup.cfg \
99+ --replace "Flask-WTF>=0.14.3,<1" "Flask-WTF>=0.14.3,<2" \
100+ --replace "SQLAlchemy>=1.3.0,<1.4" "SQLAlchemy>=1.3.0,<1.5" \
101+ --replace "WTForms>=2.3.1,<2.4" "WTForms"
140102 '';
141103
142104 checkInputs = [
@@ -144,6 +106,8 @@ buildPythonPackage rec {
144106 pytestCheckHook
145107 ];
146108
109+ pythonImportChecks = [ "ihatemoney" ];
110+
147111 disabledTests = [
148112 "test_notifications" # requires running service.
149113 "test_invite" # requires running service.
pkgs/development/python-modules/sqlalchemy-continuum/default.nix+2−4
@@ -13,11 +13,11 @@
1313
1414buildPythonPackage rec {
1515 pname = "SQLAlchemy-Continuum";
16− version = "1.3.11";
16+ version = "1.3.12";
1717
1818 src = fetchPypi {
1919 inherit pname version;
20− sha256 = "1c9yd9s98crqgs39rc2ld2r0nchgyjrfbjdlqb99y4hhc6lv04xw";
20+ sha256 = "rlHl59MAQhsicMtZQT9rv1iQrDyVYJlawtyhvFaAM7o=";
2121 };
2222
2323 propagatedBuildInputs = [
@@ -41,7 +41,5 @@ buildPythonPackage rec {
4141 homepage = "https://github.com/kvesteri/sqlalchemy-continuum/";
4242 description = "Versioning and auditing extension for SQLAlchemy";
4343 license = licenses.bsd3;
44− # https://github.com/kvesteri/sqlalchemy-continuum/issues/255
45− broken = lib.versionAtLeast sqlalchemy.version "1.4";
4644 };
4745}