summary refs log tree commit diff
path: root/pkgs/development/tools/analysis/cpplint/default.nix
blob: 10ed99e3ffe6d3e921f10ec4af3de9c4276587a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, pythonPackages, fetchFromGitHub }:

pythonPackages.buildPythonApplication rec {
  pname = "cpplint";
  version = "1.3.0";

  # Fetch from github instead of pypi, since the test cases are not in the pypi archive
  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = version;
    sha256 = "107v7bp35kxbv9v7wl79h7115z1m4b48rhasp0cnivql1grd277i";
  };

  postPatch = ''
    patchShebangs cpplint_unittest.py
  '';

  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 ];
  };
}