2021-02-25 08:34:29 +00:00
|
|
|
{ stdenv, lib, substituteAll, fetchurl, cmake, libogg, libvorbis, libtheora, curl, freetype
|
2018-03-12 22:00:49 +00:00
|
|
|
, libjpeg, libpng, SDL2, libGL, openal, zlib
|
|
|
|
}:
|
|
|
|
|
2021-02-25 08:34:29 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "warsow-engine";
|
2018-03-12 22:00:49 +00:00
|
|
|
version = "2.1.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-21 11:27:20 +01:00
|
|
|
url = "http://slice.sh/warsow/warsow_21_sdk.tar.gz";
|
2018-03-12 22:00:49 +00:00
|
|
|
sha256 = "0fj5k7qpf6far8i1xhqxlpfjch10zj26xpilhp95aq2yiz08pj4r";
|
|
|
|
};
|
|
|
|
|
2021-02-25 08:34:29 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./libpath.patch;
|
|
|
|
inherit zlib curl libpng libjpeg libogg libvorbis libtheora freetype;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-03-12 22:00:49 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libogg libvorbis libtheora curl freetype libjpeg SDL2 libGL openal zlib
|
|
|
|
libpng
|
|
|
|
];
|
|
|
|
|
2021-02-25 08:34:29 +00:00
|
|
|
cmakeFlags = [ "-DQFUSION_GAME=Warsow" ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2018-03-12 22:00:49 +00:00
|
|
|
cd source/source
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-25 08:34:29 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2018-03-12 22:00:49 +00:00
|
|
|
mkdir -p $out/lib
|
|
|
|
cp -r libs $out/lib/warsow
|
|
|
|
for i in warsow.* wsw_server.* wswtv_server.*; do
|
|
|
|
install -Dm755 "$i" "$out/bin/''${i%.*}"
|
|
|
|
done
|
2021-02-25 08:34:29 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2018-03-12 22:00:49 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-03-12 22:00:49 +00:00
|
|
|
description = "Multiplayer FPS game designed for competitive gaming (engine only)";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.warsow.net";
|
2021-02-25 08:34:29 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2018-03-12 22:00:49 +00:00
|
|
|
maintainers = with maintainers; [ astsmtl abbradar ];
|
|
|
|
platforms = platforms.linux;
|
2019-08-21 13:34:18 +01:00
|
|
|
broken = stdenv.isAarch64;
|
2018-03-12 22:00:49 +00:00
|
|
|
};
|
2021-02-25 08:34:29 +00:00
|
|
|
}
|