3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/games/teeworlds/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

69 lines
1.9 KiB
Nix

{ fetchurl, stdenv, python, alsaLib, libX11, mesa, SDL, lua5, zlib, bam }:
stdenv.mkDerivation rec {
name = "teeworlds-0.6.1";
src = fetchurl {
url = "http://www.teeworlds.com/files/${name}-source.tar.gz";
sha256 = "025rcz59mdqksja4akn888c8avj9j28rk86vw7w1licdp67x8a33";
};
# Note: Teeworlds requires Python 2.x to compile. Python 3.0 will
# not work.
buildInputs = [ python alsaLib libX11 mesa SDL lua5 zlib bam ];
configurePhase = ''
bam release
'';
installPhase = ''
# Copy the graphics, sounds, etc.
mkdir -p "$out/share/${name}"
cp -rv data other/icons "$out/share/${name}"
# Copy the executables (client, server, etc.).
mkdir -p "$out/bin"
executables=""
for file in *
do
if [ -f "$file" ] && [ -x "$file" ]
then
executables="$file $executables"
fi
done
cp -v $executables "$out/bin"
# Make sure the programs are executed from the right directory so
# that they can access the graphics and sounds.
for program in $executables
do
mv -v "$out/bin/$program" "$out/bin/.wrapped-$program"
cat > "$out/bin/$program" <<EOF
#!/bin/sh
cd "$out/share/${name}" && exec "$out/bin/.wrapped-$program" "\$@"
EOF
chmod -v +x "$out/bin/$program"
done
# Copy the documentation.
mkdir -p "$out/doc/${name}"
cp -v *.txt "$out/doc/${name}"
'';
meta = {
description = "Retro multiplayer shooter game";
longDescription = ''
Teeworlds is a free online multiplayer game, available for all
major operating systems. Battle with up to 12 players in a
variety of game modes, including Team Deathmatch and Capture The
Flag. You can even design your own maps!
'';
homepage = http://teeworlds.com/;
license = "BSD-style, see `license.txt'";
maintainers = with stdenv.lib.maintainers; [ astsmtl ];
platforms = with stdenv.lib.platforms; linux;
};
}