diff --git a/pkgs/development/python-modules/pytest-flake8/default.nix b/pkgs/development/python-modules/pytest-flake8/default.nix index 93883283627..b39737ea701 100644 --- a/pkgs/development/python-modules/pytest-flake8/default.nix +++ b/pkgs/development/python-modules/pytest-flake8/default.nix @@ -1,4 +1,4 @@ -{lib, buildPythonPackage, fetchPypi, pytest, flake8}: +{lib, buildPythonPackage, fetchPypi, fetchpatch, pytest, flake8}: buildPythonPackage rec { name = "${pname}-${version}"; @@ -16,6 +16,16 @@ buildPythonPackage rec { sha256 = "1za5i09gz127yraigmcl443w6149714l279rmlfxg1bl2kdsc45a"; }; + patches = [ + # Fix pytest strict mode (pull request #24) + # https://github.com/tholo/pytest-flake8/pull/24 + (fetchpatch { + name = "fix-compatibility-with-pytest-strict-mode.patch"; + url = "https://github.com/tholo/pytest-flake8/commit/434e1b07b4b77bfe1ddb9b2b54470c6c3815bb1a.patch"; + sha256 = "0idwgkwwysx2cibnykd81yxrgqzkpf42j99jmpnanqzi99qnc3wx"; + }) + ]; + checkPhase = '' pytest --ignore=nix_run_setup.py . '';