diff options
-rw-r--r-- | pkgs/games/teeworlds/default.nix | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/games/teeworlds/default.nix b/pkgs/games/teeworlds/default.nix index 4485f7f2b9b79..ea337c208dffe 100644 --- a/pkgs/games/teeworlds/default.nix +++ b/pkgs/games/teeworlds/default.nix @@ -1,4 +1,6 @@ -{ fetchurl, stdenv, python, alsaLib, libX11, mesa_glu, SDL, lua5, zlib, bam, freetype }: +{ fetchurl, stdenv, makeWrapper, python, alsaLib +, libX11, mesa_glu, SDL, lua5, zlib, bam, freetype +}: stdenv.mkDerivation rec { name = "teeworlds-0.6.3"; @@ -11,7 +13,9 @@ stdenv.mkDerivation rec { # we always want to use system libs instead of these postPatch = "rm -r other/{freetype,sdl}/{include,lib32,lib64}"; - buildInputs = [ python alsaLib libX11 mesa_glu SDL lua5 zlib bam freetype ]; + buildInputs = [ + python makeWrapper alsaLib libX11 mesa_glu SDL lua5 zlib bam freetype + ]; buildPhase = '' bam -a -v release @@ -38,12 +42,8 @@ stdenv.mkDerivation rec { # 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" + wrapProgram $out/bin/$program \ + --run "cd $out/share/${name}" done # Copy the documentation. |