Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 87 lines 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 substituteAll, 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 (substituteAll { 36 src = ./paths.patch; 37 git = "${lib.getBin git}/bin/git"; 38 }) 39 ]; 40 41 propagatedBuildInputs = [ 42 eradicate 43 mccabe 44 mypy 45 pycodestyle 46 pydocstyle 47 pyflakes 48 setuptools 49 vulture 50 ]; 51 52 # escape infinite recursion pylint -> isort -> pylama 53 doCheck = false; 54 55 nativeCheckInputs = [ 56 pylint 57 pytestCheckHook 58 ]; 59 60 preCheck = '' 61 export HOME=$TEMP 62 ''; 63 64 disabledTests = [ 65 "test_quotes" # FIXME package pylama-quotes 66 "test_radon" # FIXME package radon 67 ]; 68 69 pythonImportsCheck = [ "pylama.main" ]; 70 71 passthru.tests = { 72 check = pylama.overridePythonAttrs (_: { 73 doCheck = true; 74 }); 75 }; 76 77 meta = with lib; { 78 description = "Code audit tool for python"; 79 mainProgram = "pylama"; 80 homepage = "https://github.com/klen/pylama"; 81 changelog = "https://github.com/klen/pylama/blob/${version}/Changelog"; 82 license = licenses.mit; 83 maintainers = with maintainers; [ dotlambda ]; 84 }; 85 }; 86in 87pylama