2021-12-26 17:43:05 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, substituteAll
|
|
|
|
, git
|
|
|
|
, eradicate
|
|
|
|
, mccabe
|
|
|
|
, mypy
|
|
|
|
, pycodestyle
|
|
|
|
, pydocstyle
|
|
|
|
, pyflakes
|
|
|
|
, vulture
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylama";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "8.0.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "klen";
|
|
|
|
repo = "pylama";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-Olq/CZ/t1wqACoknAKsvdDKnyLZkxRtHokpu33I3trg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./paths.patch;
|
|
|
|
git = "${lib.getBin git}/bin/git";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
eradicate
|
|
|
|
mccabe
|
2021-12-26 17:43:05 +00:00
|
|
|
mypy
|
2020-04-24 23:36:52 +00:00
|
|
|
pycodestyle
|
|
|
|
pydocstyle
|
|
|
|
pyflakes
|
2021-12-26 17:43:05 +00:00
|
|
|
vulture
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_pylint" # infinite recursion
|
|
|
|
"test_quotes" # FIXME package pylama-quotes
|
|
|
|
"test_radon" # FIXME package radon
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pylama.main"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Code audit tool for python";
|
|
|
|
homepage = "https://github.com/klen/pylama";
|
2021-12-26 17:43:05 +00:00
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|