mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 14:03:29 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "cccc";
|
|
version = "3.1.4";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/cccc/${version}/cccc-${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"
|
|
'';
|
|
buildFlags = [ "CCC=c++" "LD=c++" ];
|
|
|
|
meta = {
|
|
description = "C and C++ Code Counter";
|
|
mainProgram = "cccc";
|
|
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 = "https://cccc.sourceforge.net/";
|
|
license = lib.licenses.gpl2;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = [ lib.maintainers.linquize ];
|
|
};
|
|
}
|