2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cccc";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "3.1.4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2022-02-10 20:34:41 +00:00
|
|
|
url = "mirror://sourceforge/cccc/${version}/cccc-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1gsdzzisrk95kajs3gfxks3bjvfd9g680fin6a9pjrism2lyrcr7";
|
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
patches = [ ./cccc.patch ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace install/install.mak --replace /usr/local/bin $out/bin
|
|
|
|
substituteInPlace install/install.mak --replace MKDIR=mkdir "MKDIR=mkdir -p"
|
|
|
|
'';
|
|
|
|
buildFlags = [ "CCC=c++" "LD=c++" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "C and C++ Code Counter";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cccc";
|
2020-04-24 23:36:52 +00:00
|
|
|
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.
|
|
|
|
'';
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://cccc.sourceforge.net/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = [ lib.maintainers.linquize ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|