summary refs log tree commit diff
path: root/pkgs/development/tools/analysis/cccc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/analysis/cccc/default.nix')
-rw-r--r--pkgs/development/tools/analysis/cccc/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/development/tools/analysis/cccc/default.nix b/pkgs/development/tools/analysis/cccc/default.nix
new file mode 100644
index 00000000000..c672c7964e7
--- /dev/null
+++ b/pkgs/development/tools/analysis/cccc/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl }:
+
+let
+  name = "cccc";
+  version = "3.1.4";
+in
+stdenv.mkDerivation {
+  name = "${name}-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${name}/${version}/${name}-${version}.tar.gz";
+    sha256 = "1gsdzzisrk95kajs3gfxks3bjvfd9g680fin6a9pjrism2lyrcr7";
+  };
+  patches = [ ./cccc.patch ];
+  preConfigure = ''
+    substituteInPlace install/install.mak --replace /usr/local/bin $out/bin
+    substituteInPlace install/install.mak --replace MKDIR=mkdir "MKDIR=mkdir -p"
+  '';
+
+  meta = {
+    description = "C and C++ Code Counter";
+    longDescription = ''
+      CCCC is a tool which analyzes C++ and Java files and generates a report
+      on various metrics of the code. Metrics supported include lines of code, McCabe's
+      complexity and metrics proposed by Chidamber&Kemerer and Henry&Kafura.
+    '';
+    homepage = "http://cccc.sourceforge.net/";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.linquize ];
+  };
+}