the-powder-toy: add derivation

This commit is contained in:
Nikolay Amiantov 2015-04-08 01:44:39 +03:00
parent 1035b7b6c9
commit 1fa5e7ae3c
3 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,34 @@
{ stdenv, fetchFromGitHub, scons, pkgconfig, SDL, lua, fftwFloat }:
let version = "90.2.322";
in
stdenv.mkDerivation rec {
name = "the-powder-toy-${version}";
src = fetchFromGitHub {
owner = "simtr";
repo = "The-Powder-Toy";
rev = "v${version}";
sha256 = "1rlxnk8icymalnr3j4bgpklq1dhhs0rpsyjx97isqqcwm2ys03q3";
};
patches = [ ./fix-env.patch ];
nativeBuildInputs = [ scons pkgconfig ];
buildInputs = [ SDL lua fftwFloat ];
buildPhase = "scons DESTDIR=$out/bin --tool='' -j$NIX_BUILD_CORES";
installPhase = ''
install -Dm 755 build/powder* "$out/bin/powder"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "A free 2D physics sandbox game";
platforms = platforms.unix;
license = licenses.gpl3;
maintainers = with maintainers; [ abbradar ];
};
}

View File

@ -0,0 +1,16 @@
diff --git a/SConscript b/SConscript
index fd08935..4d879b2 100644
--- a/SConscript
+++ b/SConscript
@@ -93,9 +93,9 @@ if msvc and platform != "Windows":
#Create SCons Environment
if platform == "Windows" and not GetOption('msvc'):
- env = Environment(tools = ['mingw'], ENV = {'PATH' : os.environ['PATH']})
+ env = Environment(tools = ['mingw'], ENV = os.environ)
else:
- env = Environment(tools = ['default'], ENV = {'PATH' : os.environ['PATH']})
+ env = Environment(tools = ['default'], ENV = os.environ)
#attempt to automatically find cross compiler
if not tool and compilePlatform == "Linux" and compilePlatform != platform:

View File

@ -12828,7 +12828,11 @@ let
synthv1 = callPackage ../applications/audio/synthv1 { };
tbe = callPackage ../games/the-butterfly-effect {};
the-powder-toy = callPackage ../games/the-powder-toy {
lua = lua5_1;
};
tbe = callPackage ../games/the-butterfly-effect { };
teetertorture = callPackage ../games/teetertorture { };