2021-11-09 09:30:04 +01:00
|
|
|
{lib, buildPythonPackage, fetchPypi, pythonOlder, fetchpatch, pytest, flake8}:
|
2017-05-06 10:26:32 +03:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-flake8";
|
2021-02-20 10:09:15 +01:00
|
|
|
version = "1.0.7";
|
2017-05-06 10:26:32 +03:00
|
|
|
|
2021-11-09 09:30:04 +01:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
2017-05-06 10:26:32 +03:00
|
|
|
# although pytest is a runtime dependency, do not add it as
|
|
|
|
# propagatedBuildInputs in order to allow packages depend on another version
|
|
|
|
# of pytest more easily
|
2019-01-05 11:54:27 +01:00
|
|
|
checkInputs = [ pytest ];
|
2017-05-06 10:26:32 +03:00
|
|
|
propagatedBuildInputs = [ flake8 ];
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 10:09:15 +01:00
|
|
|
sha256 = "f0259761a903563f33d6f099914afef339c085085e643bee8343eb323b32dd6b";
|
2017-05-06 10:26:32 +03:00
|
|
|
};
|
|
|
|
|
2021-11-09 09:30:04 +01:00
|
|
|
# see https://github.com/tholo/pytest-flake8/pull/82/commits
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/tholo/pytest-flake8/commit/eda4ef74c0f25b856fe282742ea206b21e94c24c.patch";
|
2021-11-13 20:20:54 +00:00
|
|
|
sha256 = "0kq0wshds00rk6wvkn6ccjrjyqxg7m9l7dlyaqw974asizw6byci";
|
2021-11-09 09:30:04 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-05-06 10:26:32 +03:00
|
|
|
checkPhase = ''
|
2018-07-30 13:05:55 +02:00
|
|
|
pytest .
|
2017-05-06 10:26:32 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "py.test plugin for efficiently checking PEP8 compliance";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/tholo/pytest-flake8";
|
2017-05-06 10:26:32 +03:00
|
|
|
maintainers = with lib.maintainers; [ jluttine ];
|
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
};
|
|
|
|
}
|