Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 33 lines 1.1 kB view raw
1{ stdenv, buildPythonPackage, fetchPypi, pythonOlder 2, mock, pytest, pytestrunner 3, configparser, enum34, mccabe, pycodestyle, pyflakes, functools32, typing, importlib-metadata 4}: 5 6buildPythonPackage rec { 7 pname = "flake8"; 8 version = "3.8.3"; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208"; 13 }; 14 15 checkInputs = [ pytest mock pytestrunner ]; 16 propagatedBuildInputs = [ pyflakes pycodestyle mccabe ] 17 ++ stdenv.lib.optionals (pythonOlder "3.2") [ configparser functools32 ] 18 ++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ] 19 ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ] 20 ++ stdenv.lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; 21 22 # fixtures fail to initialize correctly 23 checkPhase = '' 24 py.test tests --ignore=tests/integration/test_checker.py 25 ''; 26 27 meta = with stdenv.lib; { 28 description = "Code checking using pep8 and pyflakes"; 29 homepage = "https://pypi.python.org/pypi/flake8"; 30 license = licenses.mit; 31 maintainers = with maintainers; [ ]; 32 }; 33}