diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-01-13 20:36:09 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-01-13 20:36:09 +0000 |
commit | dc28c92e635a35f3b72b261fc097dbe65a5c6fc2 (patch) | |
tree | deca549e695ec00d3eee9c1df29005006591754c /pkgs/games | |
parent | e71dbdbb8334152dbf3083801d194b2f88cee9b4 (diff) |
Teeworlds: install all the executables (client, server, etc.).
svn path=/nixpkgs/trunk/; revision=13763
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/teeworlds/default.nix | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/pkgs/games/teeworlds/default.nix b/pkgs/games/teeworlds/default.nix index a458976e3e4e8..4aed1345e2c48 100644 --- a/pkgs/games/teeworlds/default.nix +++ b/pkgs/games/teeworlds/default.nix @@ -31,18 +31,35 @@ stdenv.mkDerivation rec { ''; installPhase = '' + # Copy the graphics, sounds, etc. ensureDir "$out/share/${name}" - cp -rv data "$out/share/${name}" + cp -rv data other/icons "$out/share/${name}" + # Copy the executables (client, server, etc.). ensureDir "$out/bin" - cp -v teeworlds "$out/bin/.wrapped-teeworlds" + executables="" + for file in * + do + if [ -f "$file" ] && [ -x "$file" ] + then + executables="$file $executables" + fi + done + cp -v $executables "$out/bin" - cat > "$out/bin/teeworlds" <<EOF + # 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-teeworlds" +cd "$out/share/${name}" && exec "$out/bin/.wrapped-$program" EOF - chmod +x "$out/bin/teeworlds" + chmod -v +x "$out/bin/$program" + done + # Copy the documentation. ensureDir "$out/doc/${name}" cp -v *.txt "$out/doc/${name}" ''; |