2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-04 12:37:57 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-10-04 12:37:57 +00:00
|
|
|
setoptconf-tmp = python3.pkgs.callPackage ./setoptconf.nix { };
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
with python3.pkgs;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "prospector";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "1.7.7";
|
2021-10-04 12:37:57 +00:00
|
|
|
format = "pyproject";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-04-24 23:36:52 +00:00
|
|
|
owner = "PyCQA";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-05-18 14:49:53 +00:00
|
|
|
hash = "sha256-sbPZmVeJtNphtjuZEfKcUgty9bJ3E/2Ya9RuX3u/XEs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-10-04 12:37:57 +00:00
|
|
|
bandit
|
2020-04-24 23:36:52 +00:00
|
|
|
dodgy
|
|
|
|
mccabe
|
2021-10-04 12:37:57 +00:00
|
|
|
mypy
|
2020-04-24 23:36:52 +00:00
|
|
|
pep8-naming
|
|
|
|
pycodestyle
|
|
|
|
pydocstyle
|
|
|
|
pyflakes
|
|
|
|
pylint
|
|
|
|
pylint-celery
|
|
|
|
pylint-django
|
|
|
|
pylint-flask
|
2021-10-04 12:37:57 +00:00
|
|
|
pylint-plugin-utils
|
|
|
|
pyroma
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
|
|
|
requirements-detector
|
2021-10-04 12:37:57 +00:00
|
|
|
setoptconf-tmp
|
|
|
|
setuptools
|
|
|
|
toml
|
|
|
|
vulture
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'requirements-detector = "^0.7"' 'requirements-detector = "*"' \
|
|
|
|
--replace 'pep8-naming = ">=0.3.3,<=0.10.0"' 'pep8-naming = "*"' \
|
|
|
|
--replace 'mccabe = "^0.6.0"' 'mccabe = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"prospector"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool to analyse Python code and output information about errors, potential problems, convention violations and complexity";
|
|
|
|
homepage = "https://github.com/PyCQA/prospector";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ kamadorueda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|