summary refs log tree commit diff
path: root/pkgs/development/python-modules/flask-gravatar/default.nix
blob: f96390211c1ffa5cff95b944a83f8a844a90f14e (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
{ lib
, buildPythonPackage
, fetchPypi
, flask
, pytestCheckHook
, pygments
}:

buildPythonPackage rec {
  pname = "flask-gravatar";
  version = "0.5.0";

  src = fetchPypi {
    pname = "Flask-Gravatar";
    inherit version;
    sha256 = "YGZfMcLGEokdto/4Aek+06CIHGyOw0arxk0qmSP1YuE=";
  };

  postPatch = ''
    sed -i setup.py \
     -e "s|tests_require=tests_require,||g" \
     -e "s|extras_require=extras_require,||g" \
     -e "s|setup_requires=setup_requires,||g"
    # pep8 is deprecated and cov not needed
    substituteInPlace pytest.ini \
     --replace "--pep8" "" \
     --replace "--cov=flask_gravatar --cov-report=term-missing" ""
  '';

  propagatedBuildInputs = [
    flask
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pygments
  ];

  pythonImportsCheck = [ "flask_gravatar" ];

  meta = with lib; {
    homepage = "https://github.com/zzzsochi/Flask-Gravatar";
    description = "Small and simple integration of gravatar into flask";
    license = licenses.bsd3;
    maintainers = with maintainers; [ gador ];
  };
}