2010-01-27 22:22:35 +00:00
|
|
|
{ stdenv, fetchurl, unzip, pkgconfig, zlib, curl, libjpeg, libvorbis
|
|
|
|
, libXxf86dga, libXxf86vm, libXinerama, SDL, mesa, openal
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "warsow-${version}";
|
2011-05-01 23:26:51 +00:00
|
|
|
version = "0.62";
|
|
|
|
mversion = "0.61"; # sometimes only engine is updated
|
2010-01-27 22:22:35 +00:00
|
|
|
src1 = fetchurl {
|
2011-01-02 23:36:25 +00:00
|
|
|
url = "http://www.zcdn.org/dl/warsow_${version}_sdk.zip";
|
2011-05-01 23:26:51 +00:00
|
|
|
sha256 = "0nb1z55lzmwarnn71dcyg9b3k7r7wxagqxks8a7rnlq7acsnra71";
|
2010-01-27 22:22:35 +00:00
|
|
|
};
|
|
|
|
src2 = fetchurl {
|
2011-05-01 23:26:51 +00:00
|
|
|
url = "http://www.zcdn.org/dl/warsow_${mversion}_unified.zip";
|
2011-04-24 12:09:33 +00:00
|
|
|
sha256 = "1b5bv4dsly7i7c4fqlkckv4da1knxl9m3kg8nlgkgr8waczgvazv";
|
2010-01-27 22:22:35 +00:00
|
|
|
};
|
|
|
|
unpackPhase = ''
|
|
|
|
mkdir warsow_${version}_sdk
|
|
|
|
cd warsow_${version}_sdk
|
|
|
|
unzip $src1
|
2011-04-24 12:09:33 +00:00
|
|
|
unzip $src2
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p source/release/
|
2011-05-01 23:26:51 +00:00
|
|
|
mv warsow_${mversion}_unified/basewsw source/release/
|
2010-01-27 22:22:35 +00:00
|
|
|
cd source
|
|
|
|
'';
|
2011-01-02 23:52:25 +00:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace snd_openal/snd_main.c --replace libopenal.so.1 ${openal}/lib/libopenal.so.1
|
|
|
|
'';
|
2010-01-27 22:22:35 +00:00
|
|
|
buildInputs = [ unzip pkgconfig zlib curl libjpeg libvorbis libXxf86dga
|
|
|
|
libXxf86vm libXinerama SDL mesa openal ];
|
|
|
|
installPhase = ''
|
|
|
|
dest=$out/opt/warsow
|
|
|
|
cd release
|
|
|
|
for f in warsow wsw_server wswtv_server; do
|
|
|
|
substituteInPlace $f --replace BINARY_DIR= BINARY_DIR=$dest
|
|
|
|
done
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $dest
|
|
|
|
mkdir -p $out/bin
|
2010-01-27 22:22:35 +00:00
|
|
|
cp -v {warsow,wsw_server,wswtv_server}.* $dest
|
|
|
|
cp -rv basewsw libs $dest
|
|
|
|
cp -v warsow wsw_server wswtv_server $out/bin
|
|
|
|
'';
|
2010-04-03 23:01:36 +00:00
|
|
|
postFixup = ''
|
|
|
|
p=$out/opt/warsow/warsow.*
|
|
|
|
cur_rpath=$(patchelf --print-rpath $p)
|
|
|
|
patchelf --set-rpath $cur_rpath:${mesa}/lib $p
|
|
|
|
'';
|
2010-01-27 22:22:35 +00:00
|
|
|
meta = {
|
|
|
|
description = "A multiplayer FPS designed for competitive gaming.";
|
|
|
|
longDescription = ''
|
|
|
|
Set in a futuristic cartoon-like world where rocketlauncher-wielding
|
|
|
|
pigs and lasergun-carrying cyberpunks roam the streets, Warsow is a
|
|
|
|
completely free fast-paced first-person shooter (FPS) for Windows, Linux
|
|
|
|
and Mac OS X.
|
|
|
|
'';
|
|
|
|
homepage = http://www.warsow.net;
|
|
|
|
# Engine is under GPLv2, everything else is under
|
|
|
|
license = [ "unfree-redistributable" ];
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ astsmtl ];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|