Files
nixpkgs/pkgs/by-name/cf/cflow/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

60 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchurl,
gettext,
emacs,
}:
stdenv.mkDerivation rec {
pname = "cflow";
version = "1.8";
src = fetchurl {
url = "mirror://gnu/cflow/cflow-${version}.tar.bz2";
hash = "sha256-gyFie1W2x4d/akP8xvn4RqlLFHaggaA1Rl96eNNJmrg=";
};
postPatch = ''
substituteInPlace "config.h.in" \
--replace-fail "[[__maybe_unused__]]" "__attribute__((__unused__))"
substituteInPlace "src/cflow.h" \
--replace-fail "/usr/bin/cpp" "${stdenv.cc.cc}/bin/cpp"
'';
buildInputs = [
gettext
]
++
# We don't have Emacs/GTK/etc. on {Dar,Cyg}win.
lib.optional (!(lib.lists.any (x: stdenv.hostPlatform.system == x) [ "i686-cygwin" ])) emacs;
doCheck = true;
meta = with lib; {
description = "Tool to analyze the control flow of C programs";
mainProgram = "cflow";
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 = licenses.gpl3Plus;
homepage = "https://www.gnu.org/software/cflow/";
maintainers = [ ];
platforms = platforms.linux ++ platforms.darwin;
};
}