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