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 longDescription = ''
25 A software engineering tool for analysing preprocessor-based
26 configurations of C or C++ source code. Its principal use is to simplify
27 a body of source code by eliminating any parts that are redundant with
28 respect to a specified configuration. Dead code removal is an
29 application of this sort.
30 '';
31 homepage = "https://coan2.sourceforge.net/";
32 license = licenses.bsd3;
33 platforms = platforms.all;
34 };
35}