the-powder-toy: unstable-2022-08-30 -> 97.0.352

add new deps jsoncpp and libpng, also add mesonFlags
-Dworkaround_elusive_bzip2=false to prevent build failure.
powder.desktop is now generated inside the build directory from a
template in ../resources/powder.template.desktop
This commit is contained in:
multiplealiases 2023-11-15 06:57:33 +08:00 committed by Emery Hemingway
parent beca814e27
commit 0a2425dcff

View File

@ -12,29 +12,33 @@
, lua , lua
, luajit , luajit
, zlib , zlib
, jsoncpp
, libpng
, Cocoa }: , Cocoa }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "the-powder-toy"; pname = "the-powder-toy";
version = "unstable-2022-08-30"; version = "97.0.352";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "The-Powder-Toy"; owner = "The-Powder-Toy";
repo = "The-Powder-Toy"; repo = "The-Powder-Toy";
rev = "9e712eba080e194fc162b475f58aaed8f4ea008e"; rev = "v${version}";
sha256 = "sha256-44xUfif1E+T9jzixWgnBxOWmzPPuVZy7rf62ig/CczA="; sha256 = "sha256-LYohsqFU9LBgTXMaV6cf8/zf3fBvT+s5A1JBpPHekH8=";
}; };
nativeBuildInputs = [ meson ninja pkg-config python3 ]; nativeBuildInputs = [ meson ninja pkg-config python3 ];
buildInputs = [ SDL2 bzip2 curl fftwFloat lua luajit zlib ] buildInputs = [ SDL2 bzip2 curl fftwFloat lua luajit zlib jsoncpp libpng ]
++ lib.optionals stdenv.isDarwin [ Cocoa ]; ++ lib.optionals stdenv.isDarwin [ Cocoa ];
mesonFlags = [ "-Dworkaround_elusive_bzip2=false" ];
installPhase = '' installPhase = ''
install -Dm 755 powder $out/bin/powder install -Dm 755 powder $out/bin/powder
mkdir -p $out/share/applications mkdir -p $out/share/applications
mv ../resources/powder.desktop $out/share/applications mv ./resources/powder.desktop $out/share/applications
mv ../resources $out/share mv ../resources $out/share
''; '';