19 stdenv.mkDerivation rec {
20 pname = "the-powder-toy";
23 src = fetchFromGitHub {
24 owner = "The-Powder-Toy";
25 repo = "The-Powder-Toy";
27 sha256 = "sha256-LYohsqFU9LBgTXMaV6cf8/zf3fBvT+s5A1JBpPHekH8=";
30 nativeBuildInputs = [ meson ninja pkg-config python3 ];
32 buildInputs = [ SDL2 bzip2 curl fftwFloat lua luajit zlib jsoncpp libpng ]
33 ++ lib.optionals stdenv.isDarwin [ Cocoa ];
35 mesonFlags = [ "-Dworkaround_elusive_bzip2=false" ];
38 install -Dm 755 powder $out/bin/powder
40 mkdir -p $out/share/applications
41 mv ../resources $out/share
42 '' + lib.optionalString stdenv.isLinux ''
43 mv ./resources/powder.desktop $out/share/applications
47 description = "A free 2D physics sandbox game";
48 homepage = "https://powdertoy.co.uk/";
49 platforms = platforms.unix;
50 license = licenses.gpl3Plus;
51 maintainers = with maintainers; [ abbradar siraben ];
52 mainProgram = "powder";