1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, glibcLocales 5, pycodestyle 6, pytestCheckHook 7, pythonOlder 8, tomli 9}: 10 11buildPythonPackage rec { 12 pname = "autopep8"; 13 version = "2.0.4"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "hhatto"; 20 repo = "autopep8"; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-TuaDnZqn9mRUsoDJkj9JK4ztvzl9JTwAk8nghIkZBvw="; 23 }; 24 25 propagatedBuildInputs = [ 26 pycodestyle 27 ] ++ lib.optionals (pythonOlder "3.11") [ 28 tomli 29 ]; 30 31 nativeCheckInputs = [ 32 glibcLocales 33 pytestCheckHook 34 ]; 35 36 env.LC_ALL = "en_US.UTF-8"; 37 38 meta = with lib; { 39 changelog = "https://github.com/hhatto/autopep8/releases/tag/v${version}"; 40 description = "A tool that automatically formats Python code to conform to the PEP 8 style guide"; 41 homepage = "https://github.com/hhatto/autopep8"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ bjornfor ]; 44 }; 45}