2011-04-28 21:50:12 +01:00
|
|
|
{ stdenv, fetchurl, cmake, mesa, sfml_git, fribidi, taglib }:
|
2011-03-20 18:24:39 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "mars-${version}";
|
2011-04-27 22:23:14 +01:00
|
|
|
version = "0.7.2";
|
2011-03-20 18:24:39 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/mars-game/mars_source_${version}.tar.gz";
|
2011-05-15 14:31:43 +01:00
|
|
|
sha256 = "092y0y1dghkvs0syjg9cv8iq0w29hkin8bznqc8sqm21v0swk451";
|
2011-03-20 18:24:39 +00:00
|
|
|
};
|
2011-04-28 21:50:12 +01:00
|
|
|
buildInputs = [ cmake mesa sfml_git fribidi taglib ];
|
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"
|
|
|
|
#! /bin/sh
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|