1{lib, buildPythonPackage, fetchPypi, pythonOlder, fetchpatch, pytest, flake8}:
2
3buildPythonPackage rec {
4 pname = "pytest-flake8";
5 version = "1.0.7";
6
7 disabled = pythonOlder "3.5";
8
9 # although pytest is a runtime dependency, do not add it as
10 # propagatedBuildInputs in order to allow packages depend on another version
11 # of pytest more easily
12 checkInputs = [ pytest ];
13 propagatedBuildInputs = [ flake8 ];
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "f0259761a903563f33d6f099914afef339c085085e643bee8343eb323b32dd6b";
18 };
19
20 # see https://github.com/tholo/pytest-flake8/pull/82/commits
21 patches = [
22 (fetchpatch {
23 url = "https://github.com/tholo/pytest-flake8/commit/eda4ef74c0f25b856fe282742ea206b21e94c24c.patch";
24 sha256 = "0kq0wshds00rk6wvkn6ccjrjyqxg7m9l7dlyaqw974asizw6byci";
25 })
26 ];
27
28 checkPhase = ''
29 pytest .
30 '';
31
32 meta = {
33 description = "py.test plugin for efficiently checking PEP8 compliance";
34 homepage = "https://github.com/tholo/pytest-flake8";
35 maintainers = with lib.maintainers; [ jluttine ];
36 license = lib.licenses.bsd2;
37 };
38}