mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
cpplint: 1.6.1 -> 1.7.0; Fix build (#339081)
This commit is contained in:
commit
e678a65570
@ -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; [
|
||||
|
Loading…
Reference in New Issue
Block a user