about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/analysis/cpplint/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/analysis/cpplint/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/analysis/cpplint/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/analysis/cpplint/default.nix b/nixpkgs/pkgs/development/tools/analysis/cpplint/default.nix
new file mode 100644
index 000000000000..10ed99e3ffe6
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/analysis/cpplint/default.nix
@@ -0,0 +1,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 ];
+  };
+}