1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 15:15:36 +00:00
nixpkgs/pkgs/development/tools/misc/cflow/default.nix

58 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, gettext, emacs }:
stdenv.mkDerivation rec {
name = "cflow-1.6";
src = fetchurl {
url = "mirror://gnu/cflow/${name}.tar.bz2";
sha256 = "1mzd3yf0dfv8h2av5vsxxlhpk21nw064h91b2kgfrdz92r0pnj1l";
};
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"
'';
buildInputs = [ gettext ] ++
# We don't have Emacs/GTK/etc. on {Dar,Cyg}win.
stdenv.lib.optional
(! (stdenv.lib.lists.any (x: stdenv.hostPlatform.system == x)
[ "i686-cygwin" ]))
emacs;
doCheck = true;
2016-06-27 00:24:49 +01:00
meta = with stdenv.lib; {
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.
'';
2016-06-27 00:24:49 +01:00
license = licenses.gpl3Plus;
homepage = https://www.gnu.org/software/cflow/;
2016-06-27 00:24:49 +01:00
maintainers = [ maintainers.vrthra ];
/* 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 00:24:49 +01:00
platforms = platforms.linux;
};
}