From 880d3c108fa92a8f66afde57e1290ef909a86fb3 Mon Sep 17 00:00:00 2001 From: Alexander Tsamutali Date: Sun, 20 Mar 2011 18:24:39 +0000 Subject: [PATCH] games/mars: New nixpkg. svn path=/nixpkgs/trunk/; revision=26434 --- pkgs/games/mars/default.nix | 30 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/games/mars/default.nix diff --git a/pkgs/games/mars/default.nix b/pkgs/games/mars/default.nix new file mode 100644 index 000000000000..7b9d423d65a8 --- /dev/null +++ b/pkgs/games/mars/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, cmake, mesa, sfml_svn, fribidi, taglib }: +stdenv.mkDerivation rec { + name = "mars-${version}"; + version = "0.7.1"; + src = fetchurl { + url = "mirror://sourceforge/mars-game/mars_source_${version}.tar.gz"; + sha256 = "050li9adkkr2br5b4r5iq4prg4qklxnmf1i34aw6qkpw89qafzha"; + }; + buildInputs = [ cmake mesa sfml_svn fribidi taglib ]; + installPhase = '' + cd .. + find -name '*.svn' -exec rm -rf {} \; + ensureDir "$out/share/mars/" + ensureDir "$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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b8aba541e9c1..7b8b4f9ead01 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7019,6 +7019,8 @@ let inherit libpng zlib; }; + mars = callPackage ../games/mars { }; + micropolis = callPackage ../games/micropolis { }; openttd = callPackage ../games/openttd {