nixpkgs-suyu/pkgs/development/tools/analysis/cccc/default.nix
Franz Pletz aff1f4ab94 Use general hardening flag toggle lists
The following parameters are now available:

  * hardeningDisable
    To disable specific hardening flags
  * hardeningEnable
    To enable specific hardening flags

Only the cc-wrapper supports this right now, but these may be reused by
other wrappers, builders or setup hooks.

cc-wrapper supports the following flags:

  * fortify
  * stackprotector
  * pie (disabled by default)
  * pic
  * strictoverflow
  * format
  * relro
  * bindnow
2016-03-05 18:55:26 +01:00

36 lines
1 KiB
Nix

{ 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";
};
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"
'';
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 ];
};
}