at 23.05-pre 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, substituteAll 5, git 6, eradicate 7, mccabe 8, mypy 9, pycodestyle 10, pydocstyle 11, pyflakes 12, vulture 13, setuptools 14, isort 15, pylint 16, pytestCheckHook 17}: 18 19let pylama = buildPythonPackage rec { 20 pname = "pylama"; 21 version = "8.4.1"; 22 23 format = "setuptools"; 24 25 src = fetchFromGitHub { 26 name = "${pname}-${version}-source"; 27 owner = "klen"; 28 repo = "pylama"; 29 rev = version; 30 hash = "sha256-WOGtZ412tX3YH42JCd5HIngunluwtMmQrOSUZp23LPU="; 31 }; 32 33 patches = [ 34 (substituteAll { 35 src = ./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 checkInputs = [ 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 = [ 69 "pylama.main" 70 ]; 71 72 passthru.tests = { 73 check = pylama.overridePythonAttrs (_: { doCheck = true; }); 74 }; 75 76 meta = with lib; { 77 description = "Code audit tool for python"; 78 homepage = "https://github.com/klen/pylama"; 79 changelog = "https://github.com/klen/pylama/blob/${version}/Changelog"; 80 license = licenses.mit; 81 maintainers = with maintainers; [ dotlambda ]; 82 }; 83}; in pylama