2016-08-22 13:55:56 +00:00
|
|
|
{ stdenv, fetchFromGitHub, scons, pkgconfig, SDL, lua, fftwFloat, zlib, bzip2 }:
|
2015-04-07 22:44:39 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "the-powder-toy-${version}";
|
2018-02-25 17:15:54 +00:00
|
|
|
version = "92.5";
|
2016-08-13 00:15:04 +00:00
|
|
|
|
2015-04-07 22:44:39 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simtr";
|
|
|
|
repo = "The-Powder-Toy";
|
|
|
|
rev = "v${version}";
|
2018-02-25 17:15:54 +00:00
|
|
|
sha256 = "1n15kgl4qnz55b32ddgmhrv64cl3awbds8arycn7mkf7akwdg1g6";
|
2015-04-07 22:44:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./fix-env.patch ];
|
|
|
|
|
2016-08-22 13:55:56 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,lua5.1,lua,g' SConscript
|
|
|
|
'';
|
|
|
|
|
2015-04-07 22:44:39 +00:00
|
|
|
nativeBuildInputs = [ scons pkgconfig ];
|
|
|
|
|
2016-08-22 13:55:56 +00:00
|
|
|
buildInputs = [ SDL lua fftwFloat zlib bzip2 ];
|
2015-04-07 22:44:39 +00:00
|
|
|
|
2018-11-12 02:52:07 +00:00
|
|
|
sconsFlags = "--tool=";
|
2015-04-07 22:44:39 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm 755 build/powder* "$out/bin/powder"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A free 2D physics sandbox game";
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = http://powdertoy.co.uk/;
|
2018-03-09 13:19:35 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
|
2015-04-07 22:44:39 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|