@@ -0,0 +1,74 @@
1+{ lib
2+, pkgs
3+, python
4+}:
5+
6+let
7+ py = python.override {
8+ packageOverrides = self: super: {
9+ pep8-naming = super.pep8-naming.overridePythonAttrs(oldAttrs: rec {
10+ version = "0.4.1";
11+ src = oldAttrs.src.override {
12+ inherit version;
13+ sha256 = "0nhf8p37y008shd4f21bkj5pizv8q0l8cpagyyb8gr059d6gvvaf";
14+ };
15+ });
16+ };
17+ };
18+ setoptconf = py.pkgs.callPackage ./setoptconf.nix { };
19+in
20+
21+with py.pkgs;
22+
23+buildPythonApplication rec {
24+ pname = "prospector";
25+ version = "1.2.0";
26+ disabled = isPy27;
27+
28+ src = pkgs.fetchFromGitHub {
29+ owner = "PyCQA";
30+ repo = pname;
31+ rev = version;
32+ sha256 = "07kb37zrrsriqzcmli0ghx7qb1iwkzh83qsiikl9jy50faby2sjg";
33+ };
34+
35+ checkInputs = [
36+ pytest
37+ ];
38+
39+ checkPhase = ''
40+ pytest
41+ '';
42+
43+ patchPhase = ''
44+ substituteInPlace setup.py \
45+ --replace 'pycodestyle<=2.4.0' 'pycodestyle<=2.5.0'
46+ '';
47+
48+ propagatedBuildInputs = [
49+ astroid
50+ django
51+ dodgy
52+ mccabe
53+ pep8-naming
54+ pycodestyle
55+ pydocstyle
56+ pyflakes
57+ pylint
58+ pylint-celery
59+ pylint-django
60+ pylint-flask
61+ pyyaml
62+ requirements-detector
63+ setoptconf
64+ ];
65+
66+ meta = with lib; {
67+ description = "Tool to analyse Python code and output information about errors, potential problems, convention violations and complexity";
68+ homepage = "https://github.com/PyCQA/prospector";
69+ license = licenses.gpl2;
70+ maintainers = with maintainers; [
71+ kamadorueda
72+ ];
73+ };
74+}