2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, sfml, fribidi, taglib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-01-15 22:18:51 +00:00
|
|
|
pname = "mars";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "unstable-17.10.2021";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thelaui";
|
|
|
|
repo = "M.A.R.S.";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "84664cda094efe6e49d9b1550e4f4f98c33eefa2";
|
|
|
|
sha256 = "sha256-SWLP926SyVTjn+UT1DCaJSo4Ue0RbyzImVnlNJQksS0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libGLU libGL sfml fribidi taglib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
cd ..
|
|
|
|
mkdir -p "$out/share/mars/"
|
|
|
|
mkdir -p "$out/bin/"
|
|
|
|
cp -rv data resources credits.txt license.txt "$out/share/mars/"
|
2022-06-16 17:23:12 +00:00
|
|
|
cp -v marsshooter "$out/bin/mars.bin"
|
2020-04-24 23:36:52 +00:00
|
|
|
cat << EOF > "$out/bin/mars"
|
|
|
|
#! ${stdenv.shell}
|
|
|
|
cd "$out/share/mars/"
|
|
|
|
exec "$out/bin/mars.bin" "\$@"
|
|
|
|
EOF
|
|
|
|
chmod +x "$out/bin/mars"
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://mars-game.sourceforge.net/";
|
|
|
|
description = "A game about fighting with ships in a 2D space setting";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.astsmtl ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|