2017-03-03 05:28:01 +01:00
|
|
|
{ stdenv, fetchurl }:
|
2008-06-06 14:26:01 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pmccabe";
|
2017-03-03 05:28:01 +01:00
|
|
|
version = "2.6";
|
2008-06-06 14:26:01 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-03 05:28:01 +01:00
|
|
|
url = "http://http.debian.net/debian/pool/main/p/pmccabe/pmccabe_${version}.tar.gz";
|
|
|
|
sha256 = "0a3h1b9fb87c82d5fbql5lc4gp338pa5s9i66dhw7zk8jdygx474";
|
2008-06-06 14:26:01 +02:00
|
|
|
};
|
|
|
|
|
2017-04-06 04:05:38 +02:00
|
|
|
patches = [
|
|
|
|
./getopt_on_darwin.patch
|
|
|
|
];
|
|
|
|
|
2008-06-06 14:26:01 +02:00
|
|
|
configurePhase = ''
|
2017-03-03 05:28:01 +01:00
|
|
|
sed -i -r Makefile \
|
|
|
|
-e 's,/usr/,/,g' \
|
|
|
|
-e "s,^DESTDIR =.*$,DESTDIR = $out," \
|
|
|
|
-e "s,^INSTALL = install.*$,INSTALL = install," \
|
|
|
|
-e "s,^all:.*$,all: \$(PROGS),"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = "make test";
|
|
|
|
|
|
|
|
doCheck = true;
|
2008-06-06 14:26:01 +02:00
|
|
|
|
2017-03-03 05:28:01 +01:00
|
|
|
meta = with stdenv.lib; {
|
2008-06-06 14:26:01 +02:00
|
|
|
description = "McCabe-style function complexity and line counting for C and C++";
|
2017-03-03 05:28:01 +01:00
|
|
|
homepage = https://people.debian.org/~bame/pmccabe/;
|
|
|
|
license = licenses.gpl2Plus;
|
2008-06-06 14:26:01 +02:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
pmccabe calculates McCabe-style cyclomatic complexity for C and
|
|
|
|
C++ source code. Per-function complexity may be used for
|
|
|
|
spotting likely trouble spots and for estimating testing
|
|
|
|
effort.
|
|
|
|
|
|
|
|
pmccabe also includes a non-commented line counter, decomment which
|
|
|
|
only removes comments from source code; codechanges, a program to
|
|
|
|
calculate the amount of change which has occurred between two source
|
|
|
|
trees or files; and vifn, to invoke vi given a function name rather
|
|
|
|
than a file name.
|
|
|
|
'';
|
2017-03-03 05:28:01 +01:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2017-04-06 04:05:38 +02:00
|
|
|
platforms = platforms.unix;
|
2008-06-06 14:26:01 +02:00
|
|
|
};
|
|
|
|
}
|