1{ lib, pythonPackages, fetchFromGitHub }:
2
3pythonPackages.buildPythonApplication rec {
4 pname = "cpplint";
5 version = "1.3.0";
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 = "107v7bp35kxbv9v7wl79h7115z1m4b48rhasp0cnivql1grd277i";
13 };
14
15 postPatch = ''
16 patchShebangs cpplint_unittest.py
17 '';
18
19 checkPhase = ''
20 ./cpplint_unittest.py
21 '';
22
23 meta = with lib; {
24 homepage = https://github.com/cpplint/cpplint;
25 description = "Static code checker for C++";
26 maintainers = [ maintainers.bhipple ];
27 license = [ licenses.bsd3 ];
28 };
29}