Merge pull request #48528 from dtzWill/update/teeworlds-0.6.5
teeworlds: 0.6.4 -> 0.6.5
This commit is contained in:
commit
5c065588de
@ -1,54 +1,35 @@
|
|||||||
{ fetchurl, stdenv, makeWrapper, python, alsaLib
|
{ fetchurl, stdenv, cmake, pkgconfig, makeWrapper, python, alsaLib
|
||||||
, libX11, libGLU, SDL, lua5, zlib, bam, freetype
|
, libX11, libGLU, SDL, lua5, zlib, freetype, wavpack
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "teeworlds-0.6.4";
|
name = "teeworlds-0.6.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://downloads.teeworlds.com/teeworlds-0.6.4-src.tar.gz";
|
url = "https://downloads.teeworlds.com/teeworlds-0.6.5-src.tar.gz";
|
||||||
sha256 = "1qlqzp4wqh1vnip081lbsjnx5jj5m5y4msrcm8glbd80pfgd2qf2";
|
sha256 = "07llxjc47d1gd9jqj3vf08cmw26ha6189mwcix1khwa3frfbilqb";
|
||||||
};
|
};
|
||||||
|
|
||||||
# we always want to use system libs instead of these
|
postPatch = ''
|
||||||
postPatch = "rm -r other/{freetype,sdl}/{include,lib32,lib64}";
|
# we always want to use system libs instead of these
|
||||||
|
rm -r other/{freetype,sdl}/{include,mac,windows}
|
||||||
|
|
||||||
buildInputs = [
|
# set compiled-in DATA_DIR so resources can be found
|
||||||
python makeWrapper alsaLib libX11 libGLU SDL lua5 zlib bam freetype
|
substituteInPlace src/engine/shared/storage.cpp \
|
||||||
];
|
--replace '#define DATA_DIR "data"' \
|
||||||
|
'#define DATA_DIR "${placeholder "out"}/share/teeworlds/data"'
|
||||||
buildPhase = ''
|
|
||||||
bam -a -v release
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
# 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
|
buildInputs = [
|
||||||
# that they can access the graphics and sounds.
|
python alsaLib libX11 libGLU SDL lua5 zlib freetype wavpack
|
||||||
for program in $executables
|
];
|
||||||
do
|
|
||||||
wrapProgram $out/bin/$program \
|
|
||||||
--run "cd $out/share/${name}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Copy the documentation.
|
postInstall = ''
|
||||||
mkdir -p "$out/doc/${name}"
|
mkdir -p $out/share/doc/teeworlds
|
||||||
cp -v *.txt "$out/doc/${name}"
|
cp -v *.txt $out/share/doc/teeworlds/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
Reference in New Issue
Block a user