2021-07-15 10:59:59 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, meson, luajit, ninja, pkg-config
|
|
|
|
, python3, SDL2, lua, fftwFloat, zlib, bzip2, curl, darwin }:
|
2015-04-07 22:44:39 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "the-powder-toy";
|
2021-09-15 01:20:06 +00:00
|
|
|
version = "96.2.350";
|
2016-08-13 00:15:04 +00:00
|
|
|
|
2015-04-07 22:44:39 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-08-08 00:57:13 +00:00
|
|
|
owner = "The-Powder-Toy";
|
2015-04-07 22:44:39 +00:00
|
|
|
repo = "The-Powder-Toy";
|
|
|
|
rev = "v${version}";
|
2021-09-15 01:20:06 +00:00
|
|
|
sha256 = "sha256-OAy/Hd2UksNiIfTdpA+u9NzIq1pfe8RYG3slI4/LNnM=";
|
2015-04-07 22:44:39 +00:00
|
|
|
};
|
|
|
|
|
2021-07-15 10:59:59 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config python3 ];
|
2015-04-07 22:44:39 +00:00
|
|
|
|
2021-07-15 10:59:59 +00:00
|
|
|
buildInputs = [ luajit SDL2 lua fftwFloat zlib bzip2 curl ];
|
2015-04-07 22:44:39 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-07-15 10:59:59 +00:00
|
|
|
install -Dm 755 powder $out/bin/powder
|
2021-11-05 08:04:27 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
mv ../resources/powder.desktop $out/share/applications
|
|
|
|
mv ../resources $out/share
|
2015-04-07 22:44:39 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-15 10:59:59 +00:00
|
|
|
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-04-07 22:44:39 +00:00
|
|
|
description = "A free 2D physics sandbox game";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://powdertoy.co.uk/";
|
2022-08-03 01:19:20 +00:00
|
|
|
platforms = platforms.unix;
|
2021-07-06 05:43:22 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-08-08 00:57:13 +00:00
|
|
|
maintainers = with maintainers; [ abbradar siraben ];
|
2021-07-06 04:36:48 +00:00
|
|
|
mainProgram = "powder";
|
2015-04-07 22:44:39 +00:00
|
|
|
};
|
|
|
|
}
|