cpplint: 1.6.1 -> 1.7.0; Fix build (#339081)

This commit is contained in:
Gaétan Lepage 2024-09-02 23:02:30 +02:00 committed by GitHub
commit e678a65570
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,26 +1,32 @@
{ lib, python3Packages, fetchFromGitHub }:
{ lib, fetchpatch, python3Packages, fetchFromGitHub }:
python3Packages.buildPythonApplication rec {
pname = "cpplint";
version = "1.6.1";
version = "1.7.0";
pyproject = true;
# Fetch from github instead of pypi, since the test cases are not in the pypi archive
src = fetchFromGitHub {
owner = "cpplint";
repo = "cpplint";
rev = "refs/tags/${version}";
hash = "sha256-N5YrlhEXQGYxhsJ4M5dGYZUzA81GKRSI83goaqbtCkI=";
# Commit where version was bumped to 1.7.0, no tag available
rev = "8f62396aff6dc850415cbe5ed7edf9dc95f4a731";
hash = "sha256-EKD7vkxJjoKWfPrXEQRA0X3PyAoYXi9wGgUFT1zC4WM=";
};
patches = [
# Whitespace fixes that make the tests pass
(fetchpatch {
url = "https://github.com/cpplint/cpplint/commit/fd257bd78db02888cf6b5985ab8f53d6b765704f.patch";
hash = "sha256-BNyW8QEY9fUe2zMG4RZzBHASaIsu4d2FJt5rX3VgkrQ=";
})
];
postPatch = ''
substituteInPlace setup.py \
--replace-fail '"pytest-runner==5.2"' ""
patchShebangs cpplint_unittest.py
substituteInPlace cpplint_unittest.py \
--replace-fail "assertEquals" "assertEqual"
'';
build-system = with python3Packages; [