1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, flake8 6, python 7}: 8 9buildPythonPackage rec { 10 pname = "pep8-naming"; 11 version = "0.13.1"; 12 13 src = fetchFromGitHub { 14 owner = "PyCQA"; 15 repo = pname; 16 rev = version; 17 sha256 = "sha256-NG4hLZcOMKprUyMnzkHRmUCFGyYgvT6ydBQNpgWE9h0="; 18 }; 19 20 patches = [ 21 # Fixes tests for flake8 => 5 22 # Remove on next release 23 (fetchpatch { 24 url = "https://github.com/PyCQA/pep8-naming/commit/c8808a0907f64b5d081cff8d3f9443e5ced1474e.patch"; 25 sha256 = "sha256-4c+a0viS0rXuxj+TuIfgrKZjnrjiJjDoYBbNp3+6Ed0="; 26 }) 27 ]; 28 29 propagatedBuildInputs = [ 30 flake8 31 ]; 32 33 checkPhase = '' 34 runHook preCheck 35 ${python.interpreter} run_tests.py 36 runHook postCheck 37 ''; 38 39 pythonImportsCheck = [ 40 "pep8ext_naming" 41 ]; 42 43 meta = with lib; { 44 homepage = "https://github.com/PyCQA/pep8-naming"; 45 description = "Check PEP-8 naming conventions, plugin for flake8"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ eadwu ]; 48 }; 49}