diff --git a/pkgs/development/python-modules/autopep8/default.nix b/pkgs/development/python-modules/autopep8/default.nix index 7d44be14636615b..a5c7cccffb3e8ab 100644 --- a/pkgs/development/python-modules/autopep8/default.nix +++ b/pkgs/development/python-modules/autopep8/default.nix @@ -1,5 +1,6 @@ { lib -, fetchPypi +, fetchFromGitHub +, fetchpatch , buildPythonPackage , pycodestyle , glibcLocales @@ -11,11 +12,21 @@ buildPythonPackage rec { pname = "autopep8"; version = "2.0.0"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-ixZZx/AD5pMZn1LK/9wGWFuwcWkAu8anRC/ZMdZYwHc="; + src = fetchFromGitHub { + owner = "hhatto"; + repo = "autopep8"; + rev = "v${version}"; + sha256 = "sha256-77ZVprACHUP8BmylTtvHvJMjb70E1YFKKdQDigAZG6s="; }; + 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 tomli ]; checkInputs = [ @@ -23,11 +34,6 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = [ - # missing tox.ini file from pypi package - "test_e101_skip_innocuous" - ]; - LC_ALL = "en_US.UTF-8"; meta = with lib; {