summary refs log tree commit diff
path: root/pkgs/development/python-modules/flask-wtf/default.nix
blob: 4c2e485c4bf12d364ba8fb9e250a9c032bf99cbb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, fetchPypi
, fetchpatch
, buildPythonPackage
, flask
, itsdangerous
, wtforms
, email-validator
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "flask-wtf";
  version = "1.0.1";

  src = fetchPypi {
    pname = "Flask-WTF";
    inherit version;
    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
    wtforms
  ];

  passthru.optional-dependencies = {
    email = [ email-validator ];
  };

  checkInputs = [
    pytestCheckHook
  ];

  meta = with lib; {
    description = "Simple integration of Flask and WTForms.";
    license = licenses.bsd3;
    maintainers = with maintainers; [ mic92 anthonyroussel ];
    homepage = "https://github.com/lepture/flask-wtf/";
  };
}