2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchzip, SDL2, SDL2_image, SDL2_mixer
|
2020-12-06 01:46:01 +00:00
|
|
|
, zlib, makeWrapper
|
2015-12-29 16:02:16 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-06 01:46:01 +00:00
|
|
|
pname = "sauerbraten";
|
2021-01-08 16:51:18 +00:00
|
|
|
version = "2020-12-27";
|
2015-12-29 16:02:16 +00:00
|
|
|
|
2020-12-06 01:46:01 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "mirror://sourceforge/sauerbraten/sauerbraten_${builtins.replaceStrings [ "-" ] [ "_" ] version}_linux.tar.bz2";
|
2021-01-08 16:51:18 +00:00
|
|
|
sha256 = "0llknzj23vx6f3y452by9c7wlhzclyq4bqi22qd52m3l916z2mn5";
|
2010-12-26 13:14:15 +00:00
|
|
|
};
|
|
|
|
|
2020-12-06 01:46:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
2015-12-29 16:02:16 +00:00
|
|
|
buildInputs = [
|
2019-10-12 13:45:28 +01:00
|
|
|
SDL2 SDL2_mixer SDL2_image
|
|
|
|
zlib
|
2015-12-29 16:02:16 +00:00
|
|
|
];
|
2010-12-26 13:14:15 +00:00
|
|
|
|
2020-12-06 01:46:01 +00:00
|
|
|
sourceRoot = "source/src";
|
2010-12-26 13:14:15 +00:00
|
|
|
|
2015-12-29 16:02:16 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/sauerbraten $out/share/doc/sauerbraten
|
2020-12-06 01:46:01 +00:00
|
|
|
cp -rv "../docs/"* $out/share/doc/sauerbraten/
|
|
|
|
cp -v sauer_client sauer_server $out/share/sauerbraten/
|
|
|
|
cp -rv ../packages ../data $out/share/sauerbraten/
|
|
|
|
|
|
|
|
makeWrapper $out/share/sauerbraten/sauer_server $out/bin/sauerbraten_server \
|
|
|
|
--run "cd $out/share/sauerbraten"
|
|
|
|
makeWrapper $out/share/sauerbraten/sauer_client $out/bin/sauerbraten_client \
|
|
|
|
--run "cd $out/share/sauerbraten" \
|
|
|
|
--add-flags "-q\''${HOME}"
|
2015-12-29 16:02:16 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-12-06 01:46:01 +00:00
|
|
|
description = "A free multiplayer & singleplayer first person shooter, the successor of the Cube FPS";
|
|
|
|
maintainers = with maintainers; [ raskin ajs124 ];
|
2013-11-04 23:04:36 +00:00
|
|
|
hydraPlatforms =
|
2010-12-26 13:14:15 +00:00
|
|
|
# raskin: tested amd64-linux;
|
|
|
|
# not setting platforms because it is 0.5+ GiB of game data
|
|
|
|
[];
|
|
|
|
license = "freeware"; # as an aggregate - data files have different licenses
|
|
|
|
# code is under zlib license
|
2015-12-29 16:02:16 +00:00
|
|
|
platforms = platforms.linux;
|
2010-12-26 13:14:15 +00:00
|
|
|
};
|
2015-12-29 16:02:16 +00:00
|
|
|
}
|