2011-11-06 13:54:03 +00:00
|
|
|
{ stdenv, fetchurl, unzip, SDL, libjpeg, zlib, libvorbis, curl }:
|
2013-05-02 11:13:11 +00:00
|
|
|
|
2011-11-06 13:54:03 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "xonotic-0.5.0";
|
2013-05-02 11:13:11 +00:00
|
|
|
|
2011-11-06 13:54:03 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://dl.xonotic.org/${name}.zip";
|
|
|
|
sha256 = "03vkbddffnz6ws3gkwc3qvi6icfsyiqq0dqw2vw5hj2kidm25rsq";
|
|
|
|
};
|
2013-05-02 11:13:11 +00:00
|
|
|
|
2011-11-06 13:54:03 +00:00
|
|
|
# Commented out things needed to build cl-release because of errors.
|
|
|
|
#buildInputs = [ libX11 libXpm libXext xf86dgaproto libXxf86dga libXxf86vm mesa ];
|
|
|
|
buildInputs = [ unzip SDL libjpeg ];
|
2013-05-02 11:13:11 +00:00
|
|
|
|
2011-11-06 13:54:03 +00:00
|
|
|
sourceRoot = "Xonotic/source/darkplaces";
|
2013-05-02 11:13:11 +00:00
|
|
|
|
2011-11-06 13:54:03 +00:00
|
|
|
#patchPhase = ''
|
|
|
|
# substituteInPlace glquake.h \
|
|
|
|
# --replace 'typedef char GLchar;' '/*typedef char GLchar;*/'
|
|
|
|
#'';
|
2013-05-02 11:13:11 +00:00
|
|
|
|
|
|
|
NIX_LDFLAGS = ''
|
2011-11-06 13:54:03 +00:00
|
|
|
-rpath ${zlib}/lib
|
|
|
|
-rpath ${libvorbis}/lib
|
|
|
|
-rpath ${curl}/lib
|
2013-05-02 11:13:11 +00:00
|
|
|
'';
|
|
|
|
|
2011-11-06 13:54:03 +00:00
|
|
|
buildPhase = ''
|
|
|
|
DP_FS_BASEDIR="$out/share/xonotic"
|
|
|
|
#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
|
|
|
|
'';
|
2013-05-02 11:13:11 +00:00
|
|
|
|
2011-11-06 13:54:03 +00:00
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/bin"
|
2011-11-06 13:54:03 +00:00
|
|
|
cp darkplaces-dedicated "$out/bin/xonotic-dedicated"
|
|
|
|
cp darkplaces-sdl "$out/bin/xonotic-sdl"
|
|
|
|
cd ../..
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/xonotic"
|
2011-11-06 13:54:03 +00:00
|
|
|
mv data "$out/share/xonotic"
|
|
|
|
'';
|
2013-05-02 11:13:11 +00:00
|
|
|
|
2011-11-06 13:54:03 +00:00
|
|
|
dontPatchELF = true;
|
2013-05-02 11:13:11 +00:00
|
|
|
|
2011-11-06 13:54:03 +00: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;
|
|
|
|
license = with stdenv.lib.licenses; gpl2Plus;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ astsmtl ];
|
2013-05-02 11:13:11 +00:00
|
|
|
#platforms = with stdenv.lib.platforms; linux;
|
2011-11-06 13:54:03 +00:00
|
|
|
};
|
|
|
|
}
|