2021-07-15 11:59:59 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, meson, luajit, ninja, pkg-config
|
|
|
|
, python3, SDL2, lua, fftwFloat, zlib, bzip2, curl, darwin }:
|
2015-04-07 23:44:39 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "the-powder-toy";
|
2021-07-19 11:23:42 +01:00
|
|
|
version = "96.1.349";
|
2016-08-13 01:15:04 +01:00
|
|
|
|
2015-04-07 23:44:39 +01:00
|
|
|
src = fetchFromGitHub {
|
2020-08-08 01:57:13 +01:00
|
|
|
owner = "The-Powder-Toy";
|
2015-04-07 23:44:39 +01:00
|
|
|
repo = "The-Powder-Toy";
|
|
|
|
rev = "v${version}";
|
2021-07-19 11:23:42 +01:00
|
|
|
sha256 = "sha256-MSN81kPaH8cWZO+QEOlMUQQghs1kn8CpsKA5SUC/RX8=";
|
2015-04-07 23:44:39 +01:00
|
|
|
};
|
|
|
|
|
2021-07-15 11:59:59 +01:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config python3 ];
|
2015-04-07 23:44:39 +01:00
|
|
|
|
2021-07-15 11:59:59 +01:00
|
|
|
buildInputs = [ luajit SDL2 lua fftwFloat zlib bzip2 curl ];
|
2015-04-07 23:44:39 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-07-15 11:59:59 +01:00
|
|
|
install -Dm 755 powder $out/bin/powder
|
2015-04-07 23:44:39 +01:00
|
|
|
'';
|
|
|
|
|
2021-07-15 11:59:59 +01:00
|
|
|
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
|
|
|
|
|
2015-04-07 23:44:39 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-04-07 23:44:39 +01:00
|
|
|
description = "A free 2D physics sandbox game";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://powdertoy.co.uk/";
|
2018-03-09 13:19:35 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
|
2021-07-06 06:43:22 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2020-08-08 01:57:13 +01:00
|
|
|
maintainers = with maintainers; [ abbradar siraben ];
|
2021-07-06 05:36:48 +01:00
|
|
|
mainProgram = "powder";
|
2015-04-07 23:44:39 +01:00
|
|
|
};
|
|
|
|
}
|