2014-01-01 17:59:42 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, # required for both
|
|
|
|
unzip, zlib, curl, libjpeg, libpng, libvorbis, libtheora
|
|
|
|
, libogg, libmodplug
|
|
|
|
, # glx
|
2019-11-10 17:44:34 +01:00
|
|
|
libX11, libGLU, libGL, libXpm, libXext, libXxf86vm, libXxf86dga, alsaLib
|
2014-01-01 17:59:42 +01:00
|
|
|
, # sdl
|
|
|
|
SDL
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "2.5.2";
|
|
|
|
|
2019-09-09 01:38:31 +02:00
|
|
|
version_short = stdenv.lib.replaceChars [ "." ] [ "" ] version;
|
2014-01-01 17:59:42 +01:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "nexuiz";
|
|
|
|
inherit version;
|
2014-01-01 17:59:42 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/nexuiz/nexuiz-${version_short}.zip";
|
|
|
|
sha256 = "0010jrxc68qqinkvdh1qn2b8z3sa5v1kcd8d1m4llp3pr6y7xqm5";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
# required for both
|
|
|
|
unzip
|
|
|
|
# glx
|
2019-11-10 17:44:34 +01:00
|
|
|
libX11 libGLU libGL libXpm libXext libXxf86vm libXxf86dga alsaLib
|
2014-01-01 17:59:42 +01:00
|
|
|
# sdl
|
|
|
|
SDL
|
|
|
|
];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
cd Nexuiz/sources/
|
|
|
|
unzip enginesource*.zip
|
|
|
|
cd ../../
|
|
|
|
'';
|
|
|
|
|
|
|
|
NIX_LDFLAGS = ''
|
2015-10-06 14:34:09 +02:00
|
|
|
-rpath ${zlib.out}/lib
|
|
|
|
-rpath ${curl.out}/lib
|
|
|
|
-rpath ${libjpeg.out}/lib
|
|
|
|
-rpath ${libpng.out}/lib
|
|
|
|
-rpath ${libvorbis.out}/lib
|
|
|
|
-rpath ${libtheora.out}/lib
|
|
|
|
-rpath ${libogg.out}/lib
|
|
|
|
-rpath ${libmodplug.out}/lib
|
2014-01-01 17:59:42 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd sources/darkplaces/
|
|
|
|
DP_FS_BASEDIR="$out/share/nexuiz"
|
|
|
|
make DP_FS_BASEDIR=$DP_FS_BASEDIR cl-release
|
|
|
|
make DP_FS_BASEDIR=$DP_FS_BASEDIR sdl-release
|
|
|
|
make DP_FS_BASEDIR=$DP_FS_BASEDIR sv-release
|
|
|
|
cd ../../
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv "$out/bin/"
|
|
|
|
cp -v sources/darkplaces/darkplaces-glx "$out/bin/nexuiz-glx"
|
|
|
|
cp -v sources/darkplaces/darkplaces-sdl "$out/bin/nexuiz-sdl"
|
|
|
|
cp -v sources/darkplaces/darkplaces-dedicated "$out/bin/nexuiz-dedicated"
|
|
|
|
mkdir -pv "$out/share/nexuiz/"
|
|
|
|
cp -rv data/ "$out/share/nexuiz/"
|
|
|
|
ln -s "$out/bin/nexuiz-sdl" "$out/bin/nexuiz"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A free fast-paced first-person shooter";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.alientrap.org/games/nexuiz";
|
2014-01-01 17:59:42 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|