teeworlds: use wrapProgram

Replace custom wrapper by wrapProgram tool.

+8 -8
+8 -8
pkgs/games/teeworlds/default.nix
··· 1 - { fetchurl, stdenv, python, alsaLib, libX11, mesa_glu, SDL, lua5, zlib, bam, freetype }: 1 + { fetchurl, stdenv, makeWrapper, python, alsaLib 2 + , libX11, mesa_glu, SDL, lua5, zlib, bam, freetype 3 + }: 2 4 3 5 stdenv.mkDerivation rec { 4 6 name = "teeworlds-0.6.3"; ··· 11 13 # we always want to use system libs instead of these 12 14 postPatch = "rm -r other/{freetype,sdl}/{include,lib32,lib64}"; 13 15 14 - buildInputs = [ python alsaLib libX11 mesa_glu SDL lua5 zlib bam freetype ]; 16 + buildInputs = [ 17 + python makeWrapper alsaLib libX11 mesa_glu SDL lua5 zlib bam freetype 18 + ]; 15 19 16 20 buildPhase = '' 17 21 bam -a -v release ··· 38 42 # that they can access the graphics and sounds. 39 43 for program in $executables 40 44 do 41 - mv -v "$out/bin/$program" "$out/bin/.wrapped-$program" 42 - cat > "$out/bin/$program" <<EOF 43 - #!/bin/sh 44 - cd "$out/share/${name}" && exec "$out/bin/.wrapped-$program" "\$@" 45 - EOF 46 - chmod -v +x "$out/bin/$program" 45 + wrapProgram $out/bin/$program \ 46 + --run "cd $out/share/${name}" 47 47 done 48 48 49 49 # Copy the documentation.