1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/games/mars/default.nix
Eelco Dolstra c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00

31 lines
982 B
Nix

{ stdenv, fetchurl, cmake, mesa, sfml_git, fribidi, taglib }:
stdenv.mkDerivation rec {
name = "mars-${version}";
version = "0.7.2";
src = fetchurl {
url = "mirror://sourceforge/mars-game/mars_source_${version}.tar.gz";
sha256 = "092y0y1dghkvs0syjg9cv8iq0w29hkin8bznqc8sqm21v0swk451";
};
buildInputs = [ cmake mesa sfml_git fribidi taglib ];
installPhase = ''
cd ..
find -name '*.svn' -exec rm -rf {} \;
mkdir -p "$out/share/mars/"
mkdir -p "$out/bin/"
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 ];
};
}