From 98e6eddd835bd8efbacaa1625144c93f9f92969b Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Fri, 19 Aug 2022 07:40:10 -0700 Subject: [PATCH] python3Packages.pep8-naming: fix tests for flake8 => 5 --- .../python-modules/pep8-naming/default.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pep8-naming/default.nix b/pkgs/development/python-modules/pep8-naming/default.nix index 248961d7f040..7e9642a2bc28 100644 --- a/pkgs/development/python-modules/pep8-naming/default.nix +++ b/pkgs/development/python-modules/pep8-naming/default.nix @@ -1,6 +1,7 @@ { lib -, fetchPypi , buildPythonPackage +, fetchFromGitHub +, fetchpatch , flake8 , python }: @@ -9,11 +10,22 @@ buildPythonPackage rec { pname = "pep8-naming"; version = "0.13.1"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-Ovd82qnHll98haVs1Xk1RVPJu9P98weKd28S21TdaUQ="; + src = fetchFromGitHub { + owner = "PyCQA"; + repo = pname; + rev = version; + sha256 = "sha256-NG4hLZcOMKprUyMnzkHRmUCFGyYgvT6ydBQNpgWE9h0="; }; + patches = [ + # Fixes tests for flake8 => 5 + # Remove on next release + (fetchpatch { + url = "https://github.com/PyCQA/pep8-naming/commit/c8808a0907f64b5d081cff8d3f9443e5ced1474e.patch"; + sha256 = "sha256-4c+a0viS0rXuxj+TuIfgrKZjnrjiJjDoYBbNp3+6Ed0="; + }) + ]; + propagatedBuildInputs = [ flake8 ];