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";
|
2015-04-19 22:46:51 +02:00
|
|
|
version = "0.7.5";
|
2020-12-31 08:48:55 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thelaui";
|
|
|
|
repo = "M.A.R.S.";
|
|
|
|
rev = "c855d044094a1d92317e38935d81ba938946132e";
|
2016-06-02 13:26:44 +02:00
|
|
|
sha256 = "1r4c5gap1z2zsv4yjd34qriqkxaq4lb4rykapyzkkdf4g36lc3nh";
|
2011-03-20 19:24:39 +01:00
|
|
|
};
|
2020-12-31 08:48:55 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libGLU libGL sfml fribidi taglib ];
|
2016-09-09 11:27:22 +02:00
|
|
|
patches = [
|
|
|
|
./unbind_fix.patch
|
|
|
|
./fix-gluortho2d.patch
|
|
|
|
];
|
2011-03-20 19:24:39 +01:00
|
|
|
installPhase = ''
|
|
|
|
cd ..
|
|
|
|
find -name '*.svn' -exec rm -rf {} \;
|
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/"
|
|
|
|
cp -v mars "$out/bin/mars.bin"
|
|
|
|
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; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://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
|
|
|
};
|
|
|
|
}
|