nixpkgs/pkgs/development/tools/misc/sloccount/default.nix
Bjørn Forsman c9baba9212 Fix many package descriptions
(My OCD kicked in today...)

Remove repeated package names, capitalize first word, remove trailing
periods and move overlong descriptions to longDescription.

I also simplified some descriptions as well, when they were particularly
long or technical, often based on Arch Linux' package descriptions.

I've tried to stay away from generated expressions (and I think I
succeeded).

Some specifics worth mentioning:
 * cron, has "Vixie Cron" in its description. The "Vixie" part is not
   mentioned anywhere else. I kept it in a parenthesis at the end of the
   description.

 * ctags description started with "Exuberant Ctags ...", and the
   "exuberant" part is not mentioned elsewhere. Kept it in a parenthesis
   at the end of description.

 * nix has the description "The Nix Deployment System". Since that
   doesn't really say much what it is/does (especially after removing
   the package name!), I changed that to "Powerful package manager that
   makes package management reliable and reproducible" (borrowed from
   nixos.org).

 * Tons of "GNU Foo, Foo is a [the important bits]" descriptions
   is changed to just [the important bits]. If the package name doesn't
   contain GNU I don't think it's needed to say it in the description
   either.
2014-08-24 22:31:37 +02:00

66 lines
1.8 KiB
Nix

{ fetchurl, stdenv, perl }:
stdenv.mkDerivation rec {
name = "sloccount-2.26";
src = fetchurl {
url = "http://www.dwheeler.com/sloccount/${name}.tar.gz";
sha256 = "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs";
};
buildInputs = [ perl ];
# Make sure the Flex-generated files are newer than the `.l' files, so that
# Flex isn't needed to recompile them.
patchPhase = ''
for file in *
do
if grep -q /usr/bin/perl "$file"
then
echo "patching \`$file'..."
substituteInPlace "$file" --replace \
"/usr/bin/perl" "${perl}/bin/perl"
fi
done
for file in *.l
do
touch "$(echo $file | sed -es'/\.l$/.c/g')"
done
'';
configurePhase = ''
sed -i "makefile" -"es|PREFIX[[:blank:]]*=.*$|PREFIX = $out|g"
'';
doCheck = true;
checkPhase = ''HOME="$TMPDIR" PATH="$PWD:$PATH" make test'';
preInstall = ''
mkdir -p "$out/bin"
mkdir -p "$out/share/man/man1"
mkdir -p "$out/share/doc"
'';
meta = {
description = "Set of tools for counting physical Source Lines of Code (SLOC)";
longDescription = ''
This is the home page of "SLOCCount", a set of tools for
counting physical Source Lines of Code (SLOC) in a large number
of languages of a potentially large set of programs. This suite
of tools was used in my papers More than a Gigabuck: Estimating
GNU/Linux's Size and Estimating Linux's Size to measure the SLOC
of entire GNU/Linux distributions, and my essay Linux Kernel
2.6: It's Worth More! Others have measured Debian GNU/Linux and
the Perl CPAN library using this tool suite.
'';
license = stdenv.lib.licenses.gpl2Plus;
homepage = http://www.dwheeler.com/sloccount/;
maintainers = [ ];
platforms = stdenv.lib.platforms.all;
};
}