2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, gettext, emacs }:
|
2008-10-28 08:43:44 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-30 23:36:56 +00:00
|
|
|
name = "cflow-1.6";
|
2008-10-28 08:43:44 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/cflow/${name}.tar.bz2";
|
2019-03-30 23:36:56 +00:00
|
|
|
sha256 = "1mzd3yf0dfv8h2av5vsxxlhpk21nw064h91b2kgfrdz92r0pnj1l";
|
2008-10-28 08:43:44 +00:00
|
|
|
};
|
|
|
|
|
2008-10-28 10:25:10 +00:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace "src/cflow.h" \
|
|
|
|
--replace "/usr/bin/cpp" \
|
2015-03-04 21:15:10 +00:00
|
|
|
"$(cat ${stdenv.cc}/nix-support/orig-cc)/bin/cpp"
|
2008-10-28 10:25:10 +00:00
|
|
|
'';
|
|
|
|
|
2009-09-16 15:53:27 +01:00
|
|
|
buildInputs = [ gettext ] ++
|
|
|
|
# We don't have Emacs/GTK/etc. on {Dar,Cyg}win.
|
2021-01-23 12:26:19 +00:00
|
|
|
lib.optional
|
|
|
|
(! (lib.lists.any (x: stdenv.hostPlatform.system == x)
|
2012-11-29 13:10:49 +00:00
|
|
|
[ "i686-cygwin" ]))
|
2009-09-16 15:53:27 +01:00
|
|
|
emacs;
|
2008-10-28 08:43:44 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Tool to analyze the control flow of C programs";
|
2008-10-28 08:43:44 +00: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 00:24:49 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2008-10-28 08:43:44 +00:00
|
|
|
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.gnu.org/software/cflow/";
|
2009-07-13 15:54:01 +01:00
|
|
|
|
2016-06-27 00:24:49 +01:00
|
|
|
maintainers = [ maintainers.vrthra ];
|
2009-09-16 16:09:58 +01:00
|
|
|
|
2021-01-09 17:24:46 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2008-10-28 08:43:44 +00:00
|
|
|
};
|
|
|
|
}
|