2019-11-10 17:44:34 +01:00
|
|
|
{ stdenv, fetchurl, unzip, libGLU, libGL, libX11, SDL, openal, runtimeShell }:
|
2010-06-25 17:09:53 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "tremulous";
|
2010-06-25 17:09:53 +02:00
|
|
|
version = "1.1.0";
|
|
|
|
src1 = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://sourceforge/tremulous/${pname}-${version}.zip";
|
2010-06-25 17:09:53 +02:00
|
|
|
sha256 = "11w96y7ggm2sn5ncyaffsbg0vy9pblz2av71vqp9725wbbsndfy7";
|
|
|
|
};
|
|
|
|
# http://tremulous.net/wiki/Client_versions
|
|
|
|
src2 = fetchurl {
|
|
|
|
url = "http://releases.mercenariesguild.net/client/mgclient_source_Release_1.011.tar.gz";
|
|
|
|
sha256 = "1vrsi7va7hdp8k824663s1pyw9zpsd4bwwr50j7i1nn72b0v9a26";
|
|
|
|
};
|
|
|
|
src3 = fetchurl {
|
|
|
|
url = "http://releases.mercenariesguild.net/tremded/mg_tremded_source_1.01.tar.gz";
|
|
|
|
sha256 = "1njrqlhzjvy9myddzkagszwdcf3m4h08wip888w2rmbshs6kz6ql";
|
|
|
|
};
|
2019-11-10 17:44:34 +01:00
|
|
|
buildInputs = [ unzip libGLU libGL libX11 SDL openal ];
|
2010-06-25 17:09:53 +02:00
|
|
|
unpackPhase = ''
|
|
|
|
unzip $src1
|
|
|
|
cd tremulous
|
|
|
|
tar xvf $src2
|
|
|
|
mkdir mg_tremded_source
|
|
|
|
cd mg_tremded_source
|
|
|
|
tar xvf $src3
|
|
|
|
cd ..
|
|
|
|
'';
|
2012-01-04 17:46:25 +01:00
|
|
|
patches = [ ./parse.patch ];
|
|
|
|
patchFlags = "-p 0";
|
|
|
|
NIX_LD_FLAGS = ''
|
2014-12-17 19:11:30 +01:00
|
|
|
-rpath ${stdenv.cc}/lib
|
|
|
|
-rpath ${stdenv.cc}/lib64
|
2012-01-04 17:46:25 +01:00
|
|
|
'';
|
2010-06-25 17:09:53 +02:00
|
|
|
buildPhase = ''
|
|
|
|
cd Release_1.011
|
|
|
|
make
|
|
|
|
cd ..
|
|
|
|
cd mg_tremded_source
|
|
|
|
make
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
arch=$(uname -m | sed -e s/i.86/x86/)
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/opt/tremulous
|
2010-06-25 17:09:53 +02:00
|
|
|
cp -v Release_1.011/build/release-linux-$arch/tremulous.$arch $out/opt/tremulous/
|
|
|
|
cp -v mg_tremded_source/build/release-linux-$arch/tremded.$arch $out/opt/tremulous/
|
|
|
|
cp -rv base $out/opt/tremulous
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2010-06-25 17:09:53 +02:00
|
|
|
for b in tremulous tremded
|
|
|
|
do
|
|
|
|
cat << EOF > $out/bin/$b
|
2019-02-26 12:45:54 +01:00
|
|
|
#!${runtimeShell}
|
2010-06-25 17:09:53 +02:00
|
|
|
cd $out/opt/tremulous
|
2012-01-04 17:46:25 +01:00
|
|
|
exec ./$b.$arch "\$@"
|
2010-06-25 17:09:53 +02:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/$b
|
|
|
|
done
|
|
|
|
'';
|
2012-01-04 17:46:25 +01:00
|
|
|
dontPatchELF = true;
|
2015-05-27 21:56:04 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-06-25 17:09:53 +02:00
|
|
|
description = "A game that blends a team based FPS with elements of an RTS";
|
|
|
|
longDescription = ''
|
|
|
|
Tremulous is a free, open source game that blends a team based FPS with
|
|
|
|
elements of an RTS. Players can choose from 2 unique races, aliens and
|
|
|
|
humans. Players on both teams are able to build working structures
|
|
|
|
in-game like an RTS. These structures provide many functions, the most
|
|
|
|
important being spawning. The designated builders must ensure there are
|
|
|
|
spawn structures or other players will not be able to rejoin the game
|
|
|
|
after death. Other structures provide automated base defense (to some
|
|
|
|
degree), healing functions and much more...
|
|
|
|
'';
|
|
|
|
homepage = http://www.tremulous.net;
|
2015-05-27 21:56:04 +02:00
|
|
|
license = with licenses; [
|
|
|
|
gpl2
|
|
|
|
cc-by-sa-25 /* media */
|
|
|
|
];
|
|
|
|
maintainers = with maintainers; [ astsmtl ];
|
2015-11-17 21:29:29 +01:00
|
|
|
platforms = platforms.linux;
|
2014-08-08 17:58:34 +02:00
|
|
|
broken = true;
|
2010-06-25 17:09:53 +02:00
|
|
|
};
|
|
|
|
}
|