diff --git a/pkgs/development/tools/misc/complexity/default.nix b/pkgs/development/tools/misc/complexity/default.nix new file mode 100644 index 00000000000..076a68b8137 --- /dev/null +++ b/pkgs/development/tools/misc/complexity/default.nix @@ -0,0 +1,38 @@ +{ fetchurl, stdenv, autogen, texinfo }: + +stdenv.mkDerivation rec { + # FIXME: Currently fails to build. + name = "complexity-0.4"; + + src = fetchurl { + url = "mirror://gnu/complexity/${name}.tar.gz"; + sha256 = "0dmk2pm7vi95482hnbbp597640bsjw5gg57j8cpy87855cl69yr8"; + }; + + buildInputs = + [ autogen + texinfo # XXX: shouldn't be needed, per GCS + ]; + + # Hack to work around build defect. + makeFlags = "MAKEINFOFLAGS=--no-validate"; + + doCheck = true; + + meta = { + description = "GNU Complexity, C code complexity measurement tool"; + + longDescription = + '' GNU Complexity is a tool designed for analyzing the complexity of C + program functions. It is very similar to the McCabe scoring, but + addresses several issues not considered in that scoring scheme. + ''; + + license = "GPLv3+"; + + homepage = http://www.gnu.org/software/complexity/; + + platforms = stdenv.lib.platforms.gnu; + maintainers = [ stdenv.lib.maintainers.ludo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4df70acd39c..35d2a29fec1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2595,6 +2595,8 @@ let ccache = callPackage ../development/tools/misc/ccache { }; + complexity = callPackage ../development/tools/misc/complexity { }; + ctags = callPackage ../development/tools/misc/ctags { }; ctagsWrapped = import ../development/tools/misc/ctags/wrapped.nix {