about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pylama/default.nix
blob: 3f93aef0a3f7bd9a2679a5a1d487f33f9cfbea57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{ lib
, buildPythonPackage
, fetchFromGitHub
, substituteAll
, git
, eradicate
, mccabe
, mypy
, pycodestyle
, pydocstyle
, pyflakes
, vulture
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pylama";
  version = "8.3.6";

  format = "setuptools";

  src = fetchFromGitHub {
    name = "${pname}-${version}-source";
    owner = "klen";
    repo = "pylama";
    rev = version;
    hash = "sha256-KU/G+2Fm4G/dUuNhhk8xM0Y8+7YOUUgREONM8CQGugw=";
  };

  patches = [
    (substituteAll {
      src = ./paths.patch;
      git = "${lib.getBin git}/bin/git";
    })
  ];

  propagatedBuildInputs = [
    eradicate
    mccabe
    mypy
    pycodestyle
    pydocstyle
    pyflakes
    vulture
  ];

  checkInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    "test_pylint" # infinite recursion
    "test_quotes" # FIXME package pylama-quotes
    "test_radon" # FIXME package radon
    "test_sort"
  ];

  pythonImportsCheck = [
    "pylama.main"
  ];

  meta = with lib; {
    description = "Code audit tool for python";
    homepage = "https://github.com/klen/pylama";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
  };
}