2008-10-28 01:43:44 -07:00
|
|
|
{ stdenv, fetchurl, gettext, emacs }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-10-29 17:01:33 -07:00
|
|
|
name = "cflow-1.4";
|
2008-10-28 01:43:44 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/cflow/${name}.tar.bz2";
|
2011-10-29 17:01:33 -07:00
|
|
|
sha256 = "1jkbq97ajcf834z68hbn3xfhiz921zhn39gklml1racf0kb3jzh3";
|
2008-10-28 01:43:44 -07:00
|
|
|
};
|
|
|
|
|
2008-10-28 03:25:10 -07:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace "src/cflow.h" \
|
|
|
|
--replace "/usr/bin/cpp" \
|
2015-03-04 13:15:10 -08:00
|
|
|
"$(cat ${stdenv.cc}/nix-support/orig-cc)/bin/cpp"
|
2008-10-28 03:25:10 -07:00
|
|
|
'';
|
|
|
|
|
2009-09-16 07:53:27 -07:00
|
|
|
buildInputs = [ gettext ] ++
|
|
|
|
# We don't have Emacs/GTK/etc. on {Dar,Cyg}win.
|
|
|
|
stdenv.lib.optional
|
|
|
|
(! (stdenv.lib.lists.any (x: stdenv.system == x)
|
2012-11-29 05:10:49 -08:00
|
|
|
[ "i686-cygwin" ]))
|
2009-09-16 07:53:27 -07:00
|
|
|
emacs;
|
2008-10-28 01:43:44 -07:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
2014-08-24 07:21:08 -07:00
|
|
|
description = "Tool to analyze the control flow of C programs";
|
2008-10-28 01:43:44 -07:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
GNU cflow analyzes a collection of C source files and prints a
|
|
|
|
graph, charting control flow within the program.
|
|
|
|
|
|
|
|
GNU cflow is able to produce both direct and inverted flowgraphs
|
|
|
|
for C sources. Optionally a cross-reference listing can be
|
|
|
|
generated. Two output formats are implemented: POSIX and GNU
|
|
|
|
(extended).
|
|
|
|
|
|
|
|
The package also provides Emacs major mode for examining the
|
|
|
|
produced flowcharts in Emacs.
|
|
|
|
'';
|
|
|
|
|
2014-06-18 21:19:00 -07:00
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
2008-10-28 01:43:44 -07:00
|
|
|
|
|
|
|
homepage = http://www.gnu.org/software/cflow/;
|
2009-07-13 07:54:01 -07:00
|
|
|
|
2015-01-13 13:33:24 -08:00
|
|
|
maintainers = [ ];
|
2009-09-16 08:09:58 -07:00
|
|
|
|
|
|
|
/* On Darwin, build fails with:
|
|
|
|
|
|
|
|
Undefined symbols:
|
|
|
|
"_argp_program_version", referenced from:
|
|
|
|
_argp_program_version$non_lazy_ptr in libcflow.a(argp-parse.o)
|
|
|
|
ld: symbol(s) not found
|
|
|
|
*/
|
2011-01-05 01:58:15 -08:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2008-10-28 01:43:44 -07:00
|
|
|
};
|
|
|
|
}
|