From 0ad235a42b197831030fd54195de979aa3a16390 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sat, 10 Sep 2022 15:12:11 +0200 Subject: [PATCH 1/2] python310Packages.flask-wtf: fix failing build --- .../python-modules/flask-wtf/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/flask-wtf/default.nix b/pkgs/development/python-modules/flask-wtf/default.nix index 014f250128c3..e32877385b8b 100644 --- a/pkgs/development/python-modules/flask-wtf/default.nix +++ b/pkgs/development/python-modules/flask-wtf/default.nix @@ -1,5 +1,6 @@ { lib , fetchPypi +, fetchpatch , buildPythonPackage , flask , itsdangerous @@ -18,6 +19,20 @@ buildPythonPackage rec { sha256 = "34fe5c6fee0f69b50e30f81a3b7ea16aa1492a771fe9ad0974d164610c09a6c9"; }; + patches = [ + # Fix failing `test_set_default_message_language` test + # + # Caused by Flask 2.2 that throws an error when setup methods are + # mistakenly called before the first request. + # + # Will be fixed upstream with: https://github.com/wtforms/flask-wtf/pull/533 + # + (fetchpatch { + url = "https://github.com/wtforms/flask-wtf/commit/36a53fadf7bc42c79a1428657531961ec30ca003.patch"; + hash = "sha256-bgLwDG9Wpufm6fd/6PS83Jvvuk1Ha6XdyaWngluPs30="; + }) + ]; + propagatedBuildInputs = [ flask itsdangerous @@ -35,7 +50,7 @@ buildPythonPackage rec { meta = with lib; { description = "Simple integration of Flask and WTForms."; license = licenses.bsd3; - maintainers = [ maintainers.mic92 ]; + maintainers = with maintainers; [ mic92 ]; homepage = "https://github.com/lepture/flask-wtf/"; }; } From 7083952d2b6c3fc112f3738f94ef6f6fa148fd07 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sat, 10 Sep 2022 15:17:07 +0200 Subject: [PATCH 2/2] python310Packages.flask-wtf: add anthonyroussel to maintainers --- pkgs/development/python-modules/flask-wtf/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/flask-wtf/default.nix b/pkgs/development/python-modules/flask-wtf/default.nix index e32877385b8b..4c2e485c4bf1 100644 --- a/pkgs/development/python-modules/flask-wtf/default.nix +++ b/pkgs/development/python-modules/flask-wtf/default.nix @@ -50,7 +50,7 @@ buildPythonPackage rec { meta = with lib; { description = "Simple integration of Flask and WTForms."; license = licenses.bsd3; - maintainers = with maintainers; [ mic92 ]; + maintainers = with maintainers; [ mic92 anthonyroussel ]; homepage = "https://github.com/lepture/flask-wtf/"; }; }