diff --git a/pkgs/by-name/cp/cpplint/package.nix b/pkgs/by-name/cp/cpplint/package.nix index f28a21289b99..35df50e7375c 100644 --- a/pkgs/by-name/cp/cpplint/package.nix +++ b/pkgs/by-name/cp/cpplint/package.nix @@ -2,6 +2,7 @@ lib, python3Packages, fetchFromGitHub, + fetchpatch2, versionCheckHook, }: @@ -17,6 +18,20 @@ python3Packages.buildPythonApplication (finalAttrs: { hash = "sha256-4crTuqynQt8Nyjqea6DpREtLy7ydRF0hNVnc7tUnO1k="; }; + # Fix Python 3.14 test failures. Remove with the next release. + patches = [ + (fetchpatch2 { + name = "drop-codecs-open.patch"; + url = "https://github.com/cpplint/cpplint/commit/89bff410afed72e58d23ae084de4103986ea8630.patch?full_index=1"; + hash = "sha256-Jdeewj3GM7GMoRF7+Qz/9n1hc8PYPcXLgtSGwSUpT1E="; + }) + (fetchpatch2 { + name = "use-universal-newlines.patch"; + url = "https://github.com/cpplint/cpplint/commit/d15a8715a6e848f784fda700758c4ac2d252fd31.patch?full_index=1"; + hash = "sha256-Oo2doknEGnuxDJA0y17n1DCaKwadtMW/14a5wnIgfkw="; + }) + ]; + # We use pytest-cov-stub instead postPatch = '' substituteInPlace pyproject.toml \