1 { lib, stdenv, fetchurl, gettext, emacs }:
3 stdenv.mkDerivation rec {
8 url = "mirror://gnu/${pname}/${pname}-${version}.tar.bz2";
9 sha256 = "sha256-0BFGyvkAHiZhM0F8KoJYpktfwW/LCCoU9lKCBNDJcIY=";
13 substituteInPlace "src/cflow.h" \
14 --replace "/usr/bin/cpp" \
15 "$(cat ${stdenv.cc}/nix-support/orig-cc)/bin/cpp"
18 buildInputs = [ gettext ] ++
19 # We don't have Emacs/GTK/etc. on {Dar,Cyg}win.
21 (! (lib.lists.any (x: stdenv.hostPlatform.system == x)
28 description = "Tool to analyze the control flow of C programs";
29 mainProgram = "cflow";
32 GNU cflow analyzes a collection of C source files and prints a
33 graph, charting control flow within the program.
35 GNU cflow is able to produce both direct and inverted flowgraphs
36 for C sources. Optionally a cross-reference listing can be
37 generated. Two output formats are implemented: POSIX and GNU
40 The package also provides Emacs major mode for examining the
41 produced flowcharts in Emacs.
44 license = licenses.gpl3Plus;
46 homepage = "https://www.gnu.org/software/cflow/";
48 maintainers = [ maintainers.vrthra ];
50 platforms = platforms.linux ++ platforms.darwin;