2008-10-28 09:43:44 +01:00
|
|
|
{ stdenv, fetchurl, gettext, emacs }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-06-27 01:24:49 +02:00
|
|
|
name = "cflow-1.5";
|
2008-10-28 09:43:44 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/cflow/${name}.tar.bz2";
|
2016-06-27 01:24:49 +02:00
|
|
|
sha256 = "0yq33k5ap1zpnja64n89iai4zh018ffr72wki5a6mzczd880mr3g";
|
2008-10-28 09:43:44 +01:00
|
|
|
};
|
|
|
|
|
2008-10-28 11:25:10 +01:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace "src/cflow.h" \
|
|
|
|
--replace "/usr/bin/cpp" \
|
2015-03-04 22:15:10 +01:00
|
|
|
"$(cat ${stdenv.cc}/nix-support/orig-cc)/bin/cpp"
|
2008-10-28 11:25:10 +01:00
|
|
|
'';
|
|
|
|
|
2009-09-16 16:53:27 +02: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 14:10:49 +01:00
|
|
|
[ "i686-cygwin" ]))
|
2009-09-16 16:53:27 +02:00
|
|
|
emacs;
|
2008-10-28 09:43:44 +01:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2016-06-27 01:24:49 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Tool to analyze the control flow of C programs";
|
2008-10-28 09:43:44 +01: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.
|
|
|
|
'';
|
|
|
|
|
2016-06-27 01:24:49 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2008-10-28 09:43:44 +01:00
|
|
|
|
|
|
|
homepage = http://www.gnu.org/software/cflow/;
|
2009-07-13 16:54:01 +02:00
|
|
|
|
2016-06-27 01:24:49 +02:00
|
|
|
maintainers = [ maintainers.vrthra ];
|
2009-09-16 17:09:58 +02: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
|
|
|
|
*/
|
2016-06-27 01:24:49 +02:00
|
|
|
platforms = platforms.linux;
|
2008-10-28 09:43:44 +01:00
|
|
|
};
|
|
|
|
}
|