3
0
Fork 0
forked from mirrors/nixpkgs

teeworlds: update, cleanup

This commit is contained in:
Vladimír Čunát 2016-09-03 15:01:51 +02:00
parent 8939421da7
commit 501668ee0a

View file

@ -1,19 +1,20 @@
{ fetchurl, stdenv, python, alsaLib, libX11, mesa, SDL, lua5, zlib, bam, freetype }:
{ fetchurl, stdenv, python, alsaLib, libX11, mesa_glu, SDL, lua5, zlib, bam, freetype }:
stdenv.mkDerivation rec {
name = "teeworlds-0.6.1";
name = "teeworlds-0.6.3";
src = fetchurl {
url = "http://www.teeworlds.com/files/${name}-source.tar.gz";
sha256 = "025rcz59mdqksja4akn888c8avj9j28rk86vw7w1licdp67x8a33";
url = "https://downloads.teeworlds.com/teeworlds-0.6.3-src.tar.gz";
sha256 = "0yq7f3yan07sxrhz7mzwqv344nfmdc67p3dg173631w9fb1yf3j9";
};
# Note: Teeworlds requires Python 2.x to compile. Python 3.0 will
# not work.
buildInputs = [ python alsaLib libX11 mesa SDL lua5 zlib bam freetype ];
# we always want to use system libs instead of these
postPatch = "rm -r other/{freetype,sdl}/{include,lib32,lib64}";
configurePhase = ''
bam release
buildInputs = [ python alsaLib libX11 mesa_glu SDL lua5 zlib bam freetype ];
buildPhase = ''
bam -a -v release
'';
installPhase = ''
@ -39,9 +40,9 @@ stdenv.mkDerivation rec {
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
#!/bin/sh
cd "$out/share/${name}" && exec "$out/bin/.wrapped-$program" "\$@"
EOF
chmod -v +x "$out/bin/$program"
done