diff --git a/pkgs/development/python-modules/autopep8/default.nix b/pkgs/development/python-modules/autopep8/default.nix index a5c7cccffb3e..cc0423397d21 100644 --- a/pkgs/development/python-modules/autopep8/default.nix +++ b/pkgs/development/python-modules/autopep8/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , fetchpatch , buildPythonPackage +, pythonOlder , pycodestyle , glibcLocales , tomli @@ -10,25 +11,21 @@ buildPythonPackage rec { pname = "autopep8"; - version = "2.0.0"; + version = "2.0.1"; src = fetchFromGitHub { owner = "hhatto"; repo = "autopep8"; - rev = "v${version}"; - sha256 = "sha256-77ZVprACHUP8BmylTtvHvJMjb70E1YFKKdQDigAZG6s="; + rev = "refs/tags/v${version}"; + hash = "sha256-YEPSsUzJG4MPiiloVAf9m/UiChkhkN0+lK6spycpSvo="; }; - patches = [ - (fetchpatch { - name = "fix-pycodestyle-2.10.0.patch"; - url = "https://github.com/hhatto/autopep8/pull/659.patch"; - hash = "sha256-ulvQqJ3lUm8/9QZwH+whzrxbz8c11/ntc8zH2zfmXiE="; - }) + propagatedBuildInputs = [ + pycodestyle + ] ++ lib.optionals (pythonOlder "3.11") [ + tomli ]; - propagatedBuildInputs = [ pycodestyle tomli ]; - checkInputs = [ glibcLocales pytestCheckHook @@ -37,8 +34,9 @@ buildPythonPackage rec { LC_ALL = "en_US.UTF-8"; meta = with lib; { + changelog = "https://github.com/hhatto/autopep8/releases/tag/v${version}"; description = "A tool that automatically formats Python code to conform to the PEP 8 style guide"; - homepage = "https://pypi.org/project/autopep8/"; + homepage = "https://github.com/hhatto/autopep8"; license = licenses.mit; maintainers = with maintainers; [ bjornfor ]; };