at master 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 replaceVars, 6 git, 7 eradicate, 8 mccabe, 9 mypy, 10 pycodestyle, 11 pydocstyle, 12 pyflakes, 13 vulture, 14 setuptools, 15 pylint, 16 pytestCheckHook, 17}: 18 19let 20 pylama = buildPythonPackage rec { 21 pname = "pylama"; 22 version = "8.4.1"; 23 24 format = "setuptools"; 25 26 src = fetchFromGitHub { 27 name = "${pname}-${version}-source"; 28 owner = "klen"; 29 repo = "pylama"; 30 rev = version; 31 hash = "sha256-WOGtZ412tX3YH42JCd5HIngunluwtMmQrOSUZp23LPU="; 32 }; 33 34 patches = [ 35 (replaceVars ./paths.patch { 36 git = "${lib.getBin git}/bin/git"; 37 }) 38 ]; 39 40 propagatedBuildInputs = [ 41 eradicate 42 mccabe 43 mypy 44 pycodestyle 45 pydocstyle 46 pyflakes 47 setuptools 48 vulture 49 ]; 50 51 # escape infinite recursion pylint -> isort -> pylama 52 doCheck = false; 53 54 nativeCheckInputs = [ 55 pylint 56 pytestCheckHook 57 ]; 58 59 preCheck = '' 60 export HOME=$TEMP 61 ''; 62 63 disabledTests = [ 64 "test_quotes" # FIXME package pylama-quotes 65 "test_radon" # FIXME package radon 66 ]; 67 68 pythonImportsCheck = [ "pylama.main" ]; 69 70 passthru.tests = { 71 check = pylama.overridePythonAttrs (_: { 72 doCheck = true; 73 }); 74 }; 75 76 meta = with lib; { 77 description = "Code audit tool for python"; 78 mainProgram = "pylama"; 79 homepage = "https://github.com/klen/pylama"; 80 changelog = "https://github.com/klen/pylama/blob/${version}/Changelog"; 81 license = licenses.mit; 82 maintainers = with maintainers; [ dotlambda ]; 83 }; 84 }; 85in 86pylama