2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2008-06-06 13:26:01 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "pmccabe";
|
2017-03-03 04:28:01 +00:00
|
|
|
version = "2.6";
|
2008-06-06 13:26:01 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-03 04:28:01 +00:00
|
|
|
url = "http://http.debian.net/debian/pool/main/p/pmccabe/pmccabe_${version}.tar.gz";
|
|
|
|
sha256 = "0a3h1b9fb87c82d5fbql5lc4gp338pa5s9i66dhw7zk8jdygx474";
|
2008-06-06 13:26:01 +01:00
|
|
|
};
|
|
|
|
|
2017-04-06 03:05:38 +01:00
|
|
|
patches = [
|
|
|
|
./getopt_on_darwin.patch
|
|
|
|
];
|
|
|
|
|
2008-06-06 13:26:01 +01:00
|
|
|
configurePhase = ''
|
2017-03-03 04:28:01 +00: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 13:26:01 +01:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2008-06-06 13:26:01 +01:00
|
|
|
description = "McCabe-style function complexity and line counting for C and C++";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://people.debian.org/~bame/pmccabe/";
|
2017-03-03 04:28:01 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2008-06-06 13:26:01 +01: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 04:28:01 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2017-04-06 03:05:38 +01:00
|
|
|
platforms = platforms.unix;
|
2008-06-06 13:26:01 +01:00
|
|
|
};
|
|
|
|
}
|