2016-08-22 14:55:56 +01:00
|
|
|
{ stdenv, fetchFromGitHub, scons, pkgconfig, SDL, lua, fftwFloat, zlib, bzip2 }:
|
2015-04-07 23:44:39 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "the-powder-toy-${version}";
|
2017-07-27 13:54:45 +01:00
|
|
|
version = "92.0.331";
|
2016-08-13 01:15:04 +01:00
|
|
|
|
2015-04-07 23:44:39 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simtr";
|
|
|
|
repo = "The-Powder-Toy";
|
|
|
|
rev = "v${version}";
|
2017-07-27 13:54:45 +01:00
|
|
|
sha256 = "185zlg20qk6ic9llyf4xka923snqrpdazg568raz0jiafzzsirax";
|
2015-04-07 23:44:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./fix-env.patch ];
|
|
|
|
|
2016-08-22 14:55:56 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,lua5.1,lua,g' SConscript
|
|
|
|
'';
|
|
|
|
|
2015-04-07 23:44:39 +01:00
|
|
|
nativeBuildInputs = [ scons pkgconfig ];
|
|
|
|
|
2016-08-22 14:55:56 +01:00
|
|
|
buildInputs = [ SDL lua fftwFloat zlib bzip2 ];
|
2015-04-07 23:44:39 +01:00
|
|
|
|
|
|
|
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";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://powdertoy.co.uk/;
|
2015-04-07 23:44:39 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|