about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/flake8-polyfill/default.nix
blob: 070e69970106e6eda35db36bd3c84396fe530e67 (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
{ lib, fetchPypi, buildPythonPackage
, flake8
, mock, pep8, pytest }:

buildPythonPackage rec {
  pname = "flake8-polyfill";
  version = "1.0.2";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4";
  };

  postPatch = ''
    # Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
    substituteInPlace setup.cfg \
      --replace pytest 'tool:pytest'
  '';

  propagatedBuildInputs = [
    flake8
  ];

  checkInputs = [
    mock
    pep8
    pytest
  ];

  checkPhase = ''
    pytest tests
  '';

  meta = with lib; {
    homepage = https://gitlab.com/pycqa/flake8-polyfill;
    description = "Polyfill package for Flake8 plugins";
    license = licenses.mit;
    maintainers = with maintainers; [ eadwu ];
  };
}