about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/analysis/coan/default.nix
blob: 7104074a6a74730e0eb72fb36009a31cf57e664a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, stdenv, fetchurl, perl }:

stdenv.mkDerivation rec {
  version = "6.0.1";
  pname = "coan";

  src = fetchurl {
    url = "mirror://sourceforge/project/coan2/v${version}/${pname}-${version}.tar.gz";
    sha256 = "1d041j0nd1hc0562lbj269dydjm4rbzagdgzdnmwdxr98544yw44";
  };

  nativeBuildInputs = [ perl ];

  CXXFLAGS = "-std=c++11";

  enableParallelBuilding = true;

  postInstall = ''
    mv -v $out/share/man/man1/coan.1.{1,gz}
  '';

  meta = with lib; {
    description = "The C preprocessor chainsaw";
    mainProgram = "coan";
    longDescription = ''
      A software engineering tool for analysing preprocessor-based
      configurations of C or C++ source code. Its principal use is to simplify
      a body of source code by eliminating any parts that are redundant with
      respect to a specified configuration. Dead code removal is an
      application of this sort.
    '';
    homepage = "https://coan2.sourceforge.net/";
    license = licenses.bsd3;
    platforms = platforms.all;
  };
}