1{ fetchurl, stdenv, autogen, texinfo }:
2
3stdenv.mkDerivation rec {
4 # FIXME: Currently fails to build.
5 name = "complexity-0.4";
6
7 src = fetchurl {
8 url = "mirror://gnu/complexity/${name}.tar.gz";
9 sha256 = "0dmk2pm7vi95482hnbbp597640bsjw5gg57j8cpy87855cl69yr8";
10 };
11
12 buildInputs =
13 [ autogen
14 texinfo # XXX: shouldn't be needed, per GCS
15 ];
16
17 # Hack to work around build defect.
18 makeFlags = "MAKEINFOFLAGS=--no-validate";
19
20 doCheck = true;
21
22 preBuild = ''
23 sed -i -e '/gets is a security/d' lib/stdio.in.h
24 sed -i '42 i\
25 #undef false\
26 #undef true' src/complexity.h
27 '';
28
29 meta = {
30 description = "C code complexity measurement tool";
31
32 longDescription =
33 '' GNU Complexity is a tool designed for analyzing the complexity of C
34 program functions. It is very similar to the McCabe scoring, but
35 addresses several issues not considered in that scoring scheme.
36 '';
37
38 license = stdenv.lib.licenses.gpl3Plus;
39
40 homepage = http://www.gnu.org/software/complexity/;
41
42 platforms = stdenv.lib.platforms.gnu;
43 maintainers = [ ];
44 };
45}