{ 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" <