nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 49 lines 1.1 kB view raw
1{ lib 2, fetchPypi 3, fetchpatch 4, buildPythonPackage 5, flake8 6, flake8-polyfill 7, python 8}: 9 10buildPythonPackage rec { 11 pname = "pep8-naming"; 12 version = "0.12.1"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "sha256-uyRVlHdX0WKqTK1V26TOApAFzRaS8omaIdUdhjDKeEE="; 17 }; 18 19 propagatedBuildInputs = [ 20 flake8 21 flake8-polyfill 22 ]; 23 24 patches = [ 25 # Add missing option to get passing tests, https://github.com/PyCQA/pep8-naming/pull/181 26 (fetchpatch { 27 name = "add-missing-option.patch"; 28 url = "https://github.com/PyCQA/pep8-naming/commit/03b8f36f6a8bb8bc79dfa5a71ad9be2a0bf8bbf5.patch"; 29 sha256 = "1YTh84Yoj0MqFZoifM362563r1GuzaF+mMmdT/ckC7I="; 30 }) 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}