2014-01-01 20:47:32 +04:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, # required for both
|
|
|
|
unzip, libjpeg, zlib, libvorbis, curl
|
|
|
|
, # glx
|
|
|
|
libX11, mesa, libXpm, libXext, libXxf86vm, alsaLib
|
|
|
|
, # sdl
|
|
|
|
SDL
|
|
|
|
}:
|
2013-05-02 15:13:11 +04:00
|
|
|
|
2011-11-06 17:54:03 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2015-10-16 02:42:45 +03:00
|
|
|
name = "xonotic-0.8.1";
|
2013-05-02 15:13:11 +04:00
|
|
|
|
2011-11-06 17:54:03 +04:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://dl.xonotic.org/${name}.zip";
|
2015-10-16 02:42:45 +03:00
|
|
|
sha256 = "0vy4hkrbpz9g91gb84cbv4xl845qxaknak6hshk2yflrw90wr2xy";
|
2011-11-06 17:54:03 +04:00
|
|
|
};
|
2013-05-02 15:13:11 +04:00
|
|
|
|
2014-01-01 20:47:32 +04:00
|
|
|
buildInputs = [
|
|
|
|
# required for both
|
|
|
|
unzip libjpeg
|
|
|
|
# glx
|
|
|
|
libX11 mesa libXpm libXext libXxf86vm alsaLib
|
|
|
|
# sdl
|
|
|
|
SDL
|
|
|
|
];
|
2013-05-02 15:13:11 +04:00
|
|
|
|
2011-11-06 17:54:03 +04:00
|
|
|
sourceRoot = "Xonotic/source/darkplaces";
|
2013-05-02 15:13:11 +04:00
|
|
|
|
2011-11-06 17:54:03 +04:00
|
|
|
#patchPhase = ''
|
|
|
|
# substituteInPlace glquake.h \
|
|
|
|
# --replace 'typedef char GLchar;' '/*typedef char GLchar;*/'
|
|
|
|
#'';
|
2013-05-02 15:13:11 +04:00
|
|
|
|
|
|
|
NIX_LDFLAGS = ''
|
2011-11-06 17:54:03 +04:00
|
|
|
-rpath ${zlib}/lib
|
|
|
|
-rpath ${libvorbis}/lib
|
|
|
|
-rpath ${curl}/lib
|
2013-05-02 15:13:11 +04:00
|
|
|
'';
|
|
|
|
|
2011-11-06 17:54:03 +04:00
|
|
|
buildPhase = ''
|
|
|
|
DP_FS_BASEDIR="$out/share/xonotic"
|
2014-01-01 20:47:32 +04:00
|
|
|
make DP_FS_BASEDIR=$DP_FS_BASEDIR cl-release
|
2011-11-06 17:54:03 +04:00
|
|
|
make DP_FS_BASEDIR=$DP_FS_BASEDIR sdl-release
|
|
|
|
make DP_FS_BASEDIR=$DP_FS_BASEDIR sv-release
|
|
|
|
'';
|
2013-05-02 15:13:11 +04:00
|
|
|
|
2011-11-06 17:54:03 +04:00
|
|
|
installPhase = ''
|
2012-01-19 00:16:00 +04:00
|
|
|
mkdir -p "$out/bin"
|
2011-11-06 17:54:03 +04:00
|
|
|
cp darkplaces-dedicated "$out/bin/xonotic-dedicated"
|
|
|
|
cp darkplaces-sdl "$out/bin/xonotic-sdl"
|
2014-01-01 20:47:32 +04:00
|
|
|
cp darkplaces-glx "$out/bin/xonotic-glx"
|
2011-11-06 17:54:03 +04:00
|
|
|
cd ../..
|
2012-01-19 00:16:00 +04:00
|
|
|
mkdir -p "$out/share/xonotic"
|
2011-11-06 17:54:03 +04:00
|
|
|
mv data "$out/share/xonotic"
|
2014-01-01 20:47:32 +04:00
|
|
|
|
|
|
|
# default to sdl
|
|
|
|
ln -s "$out/bin/xonotic-sdl" "$out/bin/xonotic"
|
2011-11-06 17:54:03 +04:00
|
|
|
'';
|
2013-05-02 15:13:11 +04:00
|
|
|
|
2011-11-06 17:54:03 +04:00
|
|
|
dontPatchELF = true;
|
2013-05-02 15:13:11 +04:00
|
|
|
|
2011-11-06 17:54:03 +04:00
|
|
|
meta = {
|
|
|
|
description = "A free fast-paced first-person shooter";
|
|
|
|
longDescription = ''
|
|
|
|
Xonotic is a free, fast-paced first-person shooter that works on
|
|
|
|
Windows, OS X and Linux. The project is geared towards providing
|
|
|
|
addictive arena shooter gameplay which is all spawned and driven
|
|
|
|
by the community itself. Xonotic is a direct successor of the
|
|
|
|
Nexuiz project with years of development between them, and it
|
|
|
|
aims to become the best possible open-source FPS of its kind.
|
|
|
|
'';
|
|
|
|
homepage = http://www.xonotic.org;
|
2015-05-28 20:20:29 +03:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2011-11-06 17:54:03 +04:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ astsmtl ];
|
2013-11-05 03:04:36 +04:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
hydraPlatforms = [];
|
2011-11-06 17:54:03 +04:00
|
|
|
};
|
|
|
|
}
|