2018-02-24 13:12:44 +00:00
|
|
|
{ stdenv, fetchgit, cmake, libGLU_combined, sfml, fribidi, taglib }:
|
2011-03-20 18:24:39 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-04-19 21:46:51 +01:00
|
|
|
name = "mars-${version}-${rev}";
|
|
|
|
version = "0.7.5";
|
|
|
|
rev = "c855d04409";
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/thelaui/M.A.R.S..git";
|
|
|
|
inherit rev;
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "1r4c5gap1z2zsv4yjd34qriqkxaq4lb4rykapyzkkdf4g36lc3nh";
|
2011-03-20 18:24:39 +00:00
|
|
|
};
|
2018-02-24 13:12:44 +00:00
|
|
|
buildInputs = [ cmake libGLU_combined sfml fribidi taglib ];
|
2016-09-09 10:27:22 +01:00
|
|
|
patches = [
|
|
|
|
./unbind_fix.patch
|
|
|
|
./fix-gluortho2d.patch
|
|
|
|
];
|
2011-03-20 18:24:39 +00:00
|
|
|
installPhase = ''
|
|
|
|
cd ..
|
|
|
|
find -name '*.svn' -exec rm -rf {} \;
|
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/"
|
|
|
|
cp -v mars "$out/bin/mars.bin"
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://mars-game.sourceforge.net/;
|
|
|
|
description = "A game about fighting with ships in a 2D space setting";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.astsmtl ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = platforms.linux;
|
2011-03-20 18:24:39 +00:00
|
|
|
};
|
|
|
|
}
|