forked from mirrors/nixpkgs
teeworlds: use wrapProgram
Replace custom wrapper by wrapProgram tool.
This commit is contained in:
parent
8d977ead38
commit
f144887ba0
|
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
name = "teeworlds-0.6.3";
|
name = "teeworlds-0.6.3";
|
||||||
|
@ -11,7 +13,9 @@ stdenv.mkDerivation rec {
|
||||||
# we always want to use system libs instead of these
|
# we always want to use system libs instead of these
|
||||||
postPatch = "rm -r other/{freetype,sdl}/{include,lib32,lib64}";
|
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 = ''
|
buildPhase = ''
|
||||||
bam -a -v release
|
bam -a -v release
|
||||||
|
@ -38,12 +42,8 @@ stdenv.mkDerivation rec {
|
||||||
# that they can access the graphics and sounds.
|
# that they can access the graphics and sounds.
|
||||||
for program in $executables
|
for program in $executables
|
||||||
do
|
do
|
||||||
mv -v "$out/bin/$program" "$out/bin/.wrapped-$program"
|
wrapProgram $out/bin/$program \
|
||||||
cat > "$out/bin/$program" <<EOF
|
--run "cd $out/share/${name}"
|
||||||
#!/bin/sh
|
|
||||||
cd "$out/share/${name}" && exec "$out/bin/.wrapped-$program" "\$@"
|
|
||||||
EOF
|
|
||||||
chmod -v +x "$out/bin/$program"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy the documentation.
|
# Copy the documentation.
|
||||||
|
|
Loading…
Reference in a new issue