3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/prospector/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.4 KiB
Nix
Raw Normal View History

2020-01-10 06:56:52 +00:00
{ lib
, fetchFromGitHub
2021-10-01 01:36:30 +01:00
, python3
2020-01-10 06:56:52 +00:00
}:
let
2021-10-01 01:36:30 +01:00
setoptconf-tmp = python3.pkgs.callPackage ./setoptconf.nix { };
2020-01-10 06:56:52 +00:00
in
2021-10-01 01:36:30 +01:00
with python3.pkgs;
2020-01-10 06:56:52 +00:00
buildPythonApplication rec {
pname = "prospector";
2022-05-07 12:23:18 +01:00
version = "1.7.7";
2021-10-01 01:36:30 +01:00
format = "pyproject";
2022-05-07 12:23:18 +01:00
disabled = pythonOlder "3.7";
2020-01-10 06:56:52 +00:00
src = fetchFromGitHub {
2020-01-10 06:56:52 +00:00
owner = "PyCQA";
repo = pname;
rev = version;
2022-05-07 12:23:18 +01:00
hash = "sha256-sbPZmVeJtNphtjuZEfKcUgty9bJ3E/2Ya9RuX3u/XEs=";
2020-01-10 06:56:52 +00:00
};
2021-10-01 01:36:30 +01:00
nativeBuildInputs = [
poetry-core
];
2020-01-10 06:56:52 +00:00
propagatedBuildInputs = [
2021-10-01 01:36:30 +01:00
bandit
2020-01-10 06:56:52 +00:00
dodgy
mccabe
2021-10-01 01:36:30 +01:00
mypy
2020-01-10 06:56:52 +00:00
pep8-naming
pycodestyle
pydocstyle
pyflakes
pylint
pylint-celery
pylint-django
pylint-flask
2021-10-01 01:36:30 +01:00
pylint-plugin-utils
pyroma
2020-01-10 06:56:52 +00:00
pyyaml
requirements-detector
2021-10-01 01:36:30 +01:00
setoptconf-tmp
setuptools
toml
vulture
];
checkInputs = [
pytestCheckHook
2020-01-10 06:56:52 +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-01-10 06:56: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-07 12:23:18 +01:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ kamadorueda ];
2020-01-10 06:56:52 +00:00
};
}