1{ lib, python3Packages, fetchFromGitHub }:
2
3python3Packages.buildPythonApplication rec {
4 pname = "cpplint";
5 version = "1.5.5";
6
7 # Fetch from github instead of pypi, since the test cases are not in the pypi archive
8 src = fetchFromGitHub {
9 owner = pname;
10 repo = pname;
11 rev = version;
12 sha256 = "sha256-JXz2Ufo7JSceZVqYwCRkuAsOR08znZlIUk8GCLAyiI4=";
13 };
14
15 patches = [ ./0001-Remove-pytest-runner-version-pin.patch ];
16
17 postPatch = ''
18 patchShebangs cpplint_unittest.py
19 '';
20
21 nativeCheckInputs = with python3Packages; [ pytest pytest-runner ];
22 checkPhase = ''
23 ./cpplint_unittest.py
24 '';
25
26 meta = with lib; {
27 homepage = "https://github.com/cpplint/cpplint";
28 description = "Static code checker for C++";
29 maintainers = [ maintainers.bhipple ];
30 license = [ licenses.bsd3 ];
31 };
32}