1{ lib, fetchPypi, buildPythonPackage
2, flake8
3, mock, pep8, pytest }:
4
5buildPythonPackage rec {
6 pname = "flake8-polyfill";
7 version = "1.0.2";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4";
12 };
13
14 postPatch = ''
15 # Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
16 substituteInPlace setup.cfg \
17 --replace pytest 'tool:pytest'
18 '';
19
20 propagatedBuildInputs = [
21 flake8
22 ];
23
24 checkInputs = [
25 mock
26 pep8
27 pytest
28 ];
29
30 checkPhase = ''
31 pytest tests
32 '';
33
34 meta = with lib; {
35 homepage = "https://gitlab.com/pycqa/flake8-polyfill";
36 description = "Polyfill package for Flake8 plugins";
37 license = licenses.mit;
38 maintainers = with maintainers; [ eadwu ];
39 };
40}