2021-07-16 19:40:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, meson, luajit, ninja, pkg-config
|
|
|
|
, python3, SDL2, lua, fftwFloat, zlib, bzip2, curl, darwin }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "the-powder-toy";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "96.2.350";
|
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}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-OAy/Hd2UksNiIfTdpA+u9NzIq1pfe8RYG3slI4/LNnM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config python3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
buildInputs = [ luajit SDL2 lua fftwFloat zlib bzip2 curl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-07-16 19:40:57 +00:00
|
|
|
install -Dm 755 powder $out/bin/powder
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A free 2D physics sandbox game";
|
|
|
|
homepage = "http://powdertoy.co.uk/";
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
|
2021-07-14 22:03:04 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-08-20 17:08:02 +00:00
|
|
|
maintainers = with maintainers; [ abbradar siraben ];
|
2021-07-14 22:03:04 +00:00
|
|
|
mainProgram = "powder";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|