2018-02-24 13:12:44 +00:00
|
|
|
{ stdenv, fetchsvn, libGLU_combined, SDL, SDL_image, SDL_mixer
|
2019-02-26 11:45:54 +00:00
|
|
|
, libpng, zlib, libjpeg, imagemagick, libX11, runtimeShell
|
2015-12-29 16:02:16 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sauerbraten-r${version}";
|
|
|
|
version = "5000";
|
|
|
|
|
|
|
|
src = fetchsvn {
|
|
|
|
url = "https://svn.code.sf.net/p/sauerbraten/code";
|
|
|
|
sha256 = "17libj7dslprlwppdk3vyxdcigbsa4czln8gdyz9j264m11z1cbh";
|
|
|
|
rev = version;
|
2010-12-26 13:14:15 +00:00
|
|
|
};
|
|
|
|
|
2015-12-29 16:02:16 +00:00
|
|
|
buildInputs = [
|
2018-02-24 13:12:44 +00:00
|
|
|
libGLU_combined SDL SDL_image SDL_mixer libpng zlib libjpeg imagemagick
|
2015-12-29 16:02:16 +00:00
|
|
|
libX11
|
|
|
|
];
|
2010-12-26 13:14:15 +00:00
|
|
|
|
2015-12-29 16:02:16 +00:00
|
|
|
preBuild = ''
|
2010-12-26 13:14:15 +00:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lX11"
|
2015-12-29 16:02:16 +00:00
|
|
|
pushd src
|
2010-12-26 13:14:15 +00:00
|
|
|
'';
|
|
|
|
|
2015-12-29 16:02:16 +00:00
|
|
|
installPhase = ''
|
|
|
|
popd
|
|
|
|
mkdir -p $out/bin $out/share/sauerbraten $out/share/doc/sauerbraten
|
|
|
|
cp -rv "docs/"* $out/share/doc/sauerbraten/
|
|
|
|
cp -v src/sauer_client src/sauer_server $out/share/sauerbraten/
|
|
|
|
cp -rv packages $out/share/sauerbraten/
|
|
|
|
cp -rv data $out/share/sauerbraten/
|
|
|
|
cat > $out/bin/sauerbraten_server <<EOF
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2015-12-29 16:02:16 +00:00
|
|
|
cd $out/share/sauerbraten
|
|
|
|
./sauer_server "\$@"
|
|
|
|
EOF
|
|
|
|
cat > $out/bin/sauerbraten_client <<EOF
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2015-12-29 16:02:16 +00:00
|
|
|
cd $out/share/sauerbraten
|
|
|
|
./sauer_client "\$@"
|
|
|
|
EOF
|
2010-12-26 13:14:15 +00:00
|
|
|
chmod a+x $out/bin/sauerbraten_*
|
2015-12-29 16:02:16 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2010-12-26 13:14:15 +00:00
|
|
|
description = "";
|
2015-12-29 16:02:16 +00:00
|
|
|
maintainers = [ maintainers.raskin ];
|
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
|
|
|
}
|