2018-02-24 14:12:44 +01:00
|
|
|
{ stdenv, fetchsvn, libGLU_combined, SDL, SDL_image, SDL_mixer
|
2019-02-26 12:45:54 +01:00
|
|
|
, libpng, zlib, libjpeg, imagemagick, libX11, runtimeShell
|
2015-12-29 17:02:16 +01: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 14:14:15 +01:00
|
|
|
};
|
|
|
|
|
2015-12-29 17:02:16 +01:00
|
|
|
buildInputs = [
|
2018-02-24 14:12:44 +01:00
|
|
|
libGLU_combined SDL SDL_image SDL_mixer libpng zlib libjpeg imagemagick
|
2015-12-29 17:02:16 +01:00
|
|
|
libX11
|
|
|
|
];
|
2010-12-26 14:14:15 +01:00
|
|
|
|
2015-12-29 17:02:16 +01:00
|
|
|
preBuild = ''
|
2010-12-26 14:14:15 +01:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lX11"
|
2015-12-29 17:02:16 +01:00
|
|
|
pushd src
|
2010-12-26 14:14:15 +01:00
|
|
|
'';
|
|
|
|
|
2015-12-29 17:02:16 +01: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 12:45:54 +01:00
|
|
|
#!${runtimeShell}
|
2015-12-29 17:02:16 +01:00
|
|
|
cd $out/share/sauerbraten
|
|
|
|
./sauer_server "\$@"
|
|
|
|
EOF
|
|
|
|
cat > $out/bin/sauerbraten_client <<EOF
|
2019-02-26 12:45:54 +01:00
|
|
|
#!${runtimeShell}
|
2015-12-29 17:02:16 +01:00
|
|
|
cd $out/share/sauerbraten
|
|
|
|
./sauer_client "\$@"
|
|
|
|
EOF
|
2010-12-26 14:14:15 +01:00
|
|
|
chmod a+x $out/bin/sauerbraten_*
|
2015-12-29 17:02:16 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2010-12-26 14:14:15 +01:00
|
|
|
description = "";
|
2015-12-29 17:02:16 +01:00
|
|
|
maintainers = [ maintainers.raskin ];
|
2013-11-05 00:04:36 +01:00
|
|
|
hydraPlatforms =
|
2010-12-26 14:14:15 +01: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 17:02:16 +01:00
|
|
|
platforms = platforms.linux;
|
2010-12-26 14:14:15 +01:00
|
|
|
};
|
2015-12-29 17:02:16 +01:00
|
|
|
}
|