2020-04-24 23:36:52 +00:00
|
|
|
{ lib, python3Packages, fetchFromGitHub }:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "cpplint";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.5.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Fetch from github instead of pypi, since the test cases are not in the pypi archive
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-JXz2Ufo7JSceZVqYwCRkuAsOR08znZlIUk8GCLAyiI4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
patches = [ ./0001-Remove-pytest-runner-version-pin.patch ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs cpplint_unittest.py
|
|
|
|
'';
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
checkInputs = with python3Packages; [ pytest pytest-runner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
|
|
|
./cpplint_unittest.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/cpplint/cpplint";
|
|
|
|
description = "Static code checker for C++";
|
|
|
|
maintainers = [ maintainers.bhipple ];
|
|
|
|
license = [ licenses.bsd3 ];
|
|
|
|
};
|
|
|
|
}
|