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