blob: b1322d461ee7824f738babd580cf77bf49c3cc59 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{ stdenv, fetchurl, gettext, emacs }:
stdenv.mkDerivation rec {
name = "cflow-1.4";
src = fetchurl {
url = "mirror://gnu/cflow/${name}.tar.bz2";
sha256 = "1jkbq97ajcf834z68hbn3xfhiz921zhn39gklml1racf0kb3jzh3";
};
patchPhase = ''
substituteInPlace "src/cflow.h" \
--replace "/usr/bin/cpp" \
"$(cat ${stdenv.gcc}/nix-support/orig-gcc)/bin/cpp"
'';
buildInputs = [ gettext ] ++
# We don't have Emacs/GTK/etc. on {Dar,Cyg}win.
stdenv.lib.optional
(! (stdenv.lib.lists.any (x: stdenv.system == x)
[ "i686-cygwin" ]))
emacs;
doCheck = true;
meta = {
description = "Tool to analyze the control flow of C programs";
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.
'';
license = stdenv.lib.licenses.gpl3Plus;
homepage = http://www.gnu.org/software/cflow/;
maintainers = [ stdenv.lib.maintainers.ludo ];
/* 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
*/
platforms = stdenv.lib.platforms.linux;
};
}
|