Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "cccc"; 9 version = "3.1.4"; 10 11 src = fetchurl { 12 url = "mirror://sourceforge/cccc/${version}/cccc-${version}.tar.gz"; 13 sha256 = "1gsdzzisrk95kajs3gfxks3bjvfd9g680fin6a9pjrism2lyrcr7"; 14 }; 15 16 hardeningDisable = [ "format" ]; 17 18 patches = [ ./cccc.patch ]; 19 20 preConfigure = '' 21 substituteInPlace install/install.mak --replace /usr/local/bin $out/bin 22 substituteInPlace install/install.mak --replace MKDIR=mkdir "MKDIR=mkdir -p" 23 ''; 24 buildFlags = [ 25 "CCC=c++" 26 "LD=c++" 27 ]; 28 29 meta = { 30 description = "C and C++ Code Counter"; 31 mainProgram = "cccc"; 32 longDescription = '' 33 CCCC is a tool which analyzes C++ and Java files and generates a report 34 on various metrics of the code. Metrics supported include lines of code, McCabe's 35 complexity and metrics proposed by Chidamber&Kemerer and Henry&Kafura. 36 ''; 37 homepage = "https://cccc.sourceforge.net/"; 38 license = lib.licenses.gpl2; 39 platforms = lib.platforms.unix; 40 maintainers = [ lib.maintainers.linquize ]; 41 }; 42}