1{ lib, stdenv, fetchurl, perl }:
2
3stdenv.mkDerivation rec {
4 version = "6.0.1";
5 pname = "coan";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/project/coan2/v${version}/${pname}-${version}.tar.gz";
9 sha256 = "1d041j0nd1hc0562lbj269dydjm4rbzagdgzdnmwdxr98544yw44";
10 };
11
12 nativeBuildInputs = [ perl ];
13
14 CXXFLAGS = "-std=c++11";
15
16 enableParallelBuilding = true;
17
18 postInstall = ''
19 mv -v $out/share/man/man1/coan.1.{1,gz}
20 '';
21
22 meta = with lib; {
23 description = "The C preprocessor chainsaw";
24 mainProgram = "coan";
25 longDescription = ''
26 A software engineering tool for analysing preprocessor-based
27 configurations of C or C++ source code. Its principal use is to simplify
28 a body of source code by eliminating any parts that are redundant with
29 respect to a specified configuration. Dead code removal is an
30 application of this sort.
31 '';
32 homepage = "https://coan2.sourceforge.net/";
33 license = licenses.bsd3;
34 platforms = platforms.all;
35 };
36}