2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, SDL2
|
|
|
|
, bzip2
|
|
|
|
, curl
|
|
|
|
, fftwFloat
|
|
|
|
, lua
|
|
|
|
, luajit
|
|
|
|
, zlib
|
|
|
|
, Cocoa }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "the-powder-toy";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "unstable-2022-08-30";
|
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";
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "9e712eba080e194fc162b475f58aaed8f4ea008e";
|
|
|
|
sha256 = "sha256-44xUfif1E+T9jzixWgnBxOWmzPPuVZy7rf62ig/CczA=";
|
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
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildInputs = [ SDL2 bzip2 curl fftwFloat lua luajit zlib ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-07-16 19:40:57 +00:00
|
|
|
install -Dm 755 powder $out/bin/powder
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
mv ../resources/powder.desktop $out/share/applications
|
|
|
|
mv ../resources $out/share
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
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";
|
2022-11-21 17:40:18 +00:00
|
|
|
homepage = "https://powdertoy.co.uk/";
|
2022-08-12 12:06:08 +00:00
|
|
|
platforms = platforms.unix;
|
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
|
|
|
};
|
|
|
|
}
|