2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
{ stdenv, fetchFromGitHub, scons, pkgconfig, SDL2, lua, fftwFloat,
|
|
|
|
zlib, bzip2, curl, darwin }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "the-powder-toy";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "95.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-08-20 17:08:02 +00:00
|
|
|
owner = "The-Powder-Toy";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "The-Powder-Toy";
|
|
|
|
rev = "v${version}";
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "18rp2g1mj0gklra06wm9dm57h73hmm301npndh0y8ap192i5s8sa";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ scons pkgconfig ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin
|
|
|
|
[ darwin.apple_sdk.frameworks.Cocoa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildInputs = [ SDL2 lua fftwFloat zlib bzip2 curl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm 755 build/powder* "$out/bin/powder"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A free 2D physics sandbox game";
|
|
|
|
homepage = "http://powdertoy.co.uk/";
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
|
|
|
|
license = licenses.gpl3;
|
2020-08-20 17:08:02 +00:00
|
|
|
maintainers = with maintainers; [ abbradar siraben ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|