newtonwars: init at 2015060

This commit is contained in:
Pascal Wittmann 2015-07-06 11:36:21 +02:00
parent 8212ec8d55
commit 505f624e01
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,37 @@
{ stdenv, fetchFromGitHub, makeWrapper, freeglut, mesa }:
stdenv.mkDerivation rec {
name = "newtonwars-${version}";
version = "20150609";
src = fetchFromGitHub {
owner = "Draradech";
repo = "NewtonWars";
rev = "98bb99a1797fd0073e0fd25ef9218468d3a9f7cb";
sha256 = "0g63fwfcdxxlnqlagj1fb8ngm385gmv8f7p8b4r1z5cny2znxdvs";
};
buildInputs = [ makeWrapper freeglut mesa ];
patchPhase = ''
sed -i "s;font24.raw;$out/share/font24.raw;g" display.c
'';
buildPhase = "sh build-linux.sh";
installPhase = ''
mkdir -p $out/bin $out/share
cp nw $out/bin
cp font24.raw $out/share
wrapProgram $out/bin/nw \
--prefix LD_LIBRARY_PATH ":" ${freeglut}/lib \
--prefix LD_LIBRARY_PATH ":" ${mesa}/lib
'';
meta = with stdenv.lib; {
description = "A space battle game with gravity as the main theme";
maintainers = with maintainers; [ pSub ];
platforms = platforms.linux;
};
}

View File

@ -13553,6 +13553,8 @@ let
njam = callPackage ../games/njam { };
newtonwars = callPackage ../games/newtonwars { };
oilrush = callPackage ../games/oilrush { };
openra = callPackage ../games/openra { lua = lua5_1; };