2010-01-27 23:22:35 +01:00
|
|
|
{ stdenv, fetchurl, unzip, pkgconfig, zlib, curl, libjpeg, libvorbis
|
|
|
|
, libXxf86dga, libXxf86vm, libXinerama, SDL, mesa, openal
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "warsow-${version}";
|
2011-01-03 00:36:25 +01:00
|
|
|
version = "0.6";
|
2010-01-27 23:22:35 +01:00
|
|
|
src1 = fetchurl {
|
2011-01-03 00:36:25 +01:00
|
|
|
url = "http://www.zcdn.org/dl/warsow_${version}_sdk.zip";
|
|
|
|
sha256 = "1mrsr4af4wi04slc2f66rr467rxa15ppny7ms4gxhaqvvki5x3nq";
|
2010-01-27 23:22:35 +01:00
|
|
|
};
|
|
|
|
src2 = fetchurl {
|
2011-01-03 00:36:25 +01:00
|
|
|
url = "http://www.zcdn.org/dl/warsow_${version}_unified.zip";
|
|
|
|
sha256 = "0a4407kw86yvr411dd9m0dgp7wdkgd9j4ac32gfz6xprgplqkws3";
|
2010-01-27 23:22:35 +01:00
|
|
|
};
|
|
|
|
unpackPhase = ''
|
|
|
|
mkdir warsow_${version}_sdk
|
|
|
|
cd warsow_${version}_sdk
|
|
|
|
unzip $src1
|
|
|
|
cd source
|
|
|
|
unzip $src2 'basewsw/*' -d release
|
|
|
|
'';
|
|
|
|
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
|
|
|
|
ensureDir $dest
|
|
|
|
ensureDir $out/bin
|
|
|
|
cp -v {warsow,wsw_server,wswtv_server}.* $dest
|
|
|
|
cp -rv basewsw libs $dest
|
|
|
|
cp -v warsow wsw_server wswtv_server $out/bin
|
|
|
|
'';
|
2010-04-04 01:01:36 +02:00
|
|
|
postFixup = ''
|
|
|
|
p=$out/opt/warsow/warsow.*
|
|
|
|
cur_rpath=$(patchelf --print-rpath $p)
|
|
|
|
patchelf --set-rpath $cur_rpath:${mesa}/lib $p
|
|
|
|
'';
|
2010-01-27 23:22:35 +01: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;
|
|
|
|
};
|
|
|
|
}
|