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