diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-06-06 12:26:01 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-06-06 12:26:01 +0000 |
commit | 32588e53ef29c42a357db28bc924b1fa13f0cd3c (patch) | |
tree | 390b9226934ddeff2bae7ed0d8c1a788737a8f46 /pkgs | |
parent | f9e018c80d10f295b16c669decb4e7fec53b0a90 (diff) | |
download | nixlib-32588e53ef29c42a357db28bc924b1fa13f0cd3c.tar nixlib-32588e53ef29c42a357db28bc924b1fa13f0cd3c.tar.gz nixlib-32588e53ef29c42a357db28bc924b1fa13f0cd3c.tar.bz2 nixlib-32588e53ef29c42a357db28bc924b1fa13f0cd3c.tar.lz nixlib-32588e53ef29c42a357db28bc924b1fa13f0cd3c.tar.xz nixlib-32588e53ef29c42a357db28bc924b1fa13f0cd3c.tar.zst nixlib-32588e53ef29c42a357db28bc924b1fa13f0cd3c.zip |
Add pmccabe, a tool that computes the cyclomatic complexity of C/C++ source.
svn path=/nixpkgs/trunk/; revision=12000
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/tools/misc/pmccabe/default.nix | 36 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/pmccabe/default.nix b/pkgs/development/tools/misc/pmccabe/default.nix new file mode 100644 index 000000000000..10cf371f13a8 --- /dev/null +++ b/pkgs/development/tools/misc/pmccabe/default.nix @@ -0,0 +1,36 @@ +{ fetchurl, stdenv }: + +stdenv.mkDerivation rec { + name = "pmccabe-2.4-CVS20070814"; + + src = fetchurl { + url = "http://cvs.parisc-linux.org/download/${name}.tar.gz"; + sha256 = "0nqvfdf2cxx516nw0rwr3lhzhiyrnpc2jf45ldfwsdc9rm2nj3r9"; + }; + + configurePhase = '' + sed -i "Makefile" \ + -"es|^[[:blank:]]*DESTDIR[[:blank:]]*=.*$|DESTDIR = $out|g ; \ + s|^[[:blank:]]*INSTALL[[:blank:]]*=.*$|INSTALL = install|g ; \ + s|/usr/|/|g" + ''; + + meta = { + description = "McCabe-style function complexity and line counting for C and C++"; + homepage = http://www.parisc-linux.org/~bame/pmccabe/; + license = "GPLv2+"; + + 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. + ''; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 142648d95ec3..205290882f12 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2194,6 +2194,10 @@ let pkgs = rec { inherit fetchurl stdenv; }); + pmccabe = import ../development/tools/misc/pmccabe { + inherit fetchurl stdenv; + }; + /** * pkgconfig is optionally taken from the stdenv to allow bootstrapping * of glib and pkgconfig itself on MinGW. |