2023-07-10 11:41:50 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, cmake
|
|
|
|
, doxygen
|
|
|
|
, pkg-config
|
|
|
|
, freetype
|
|
|
|
, fmt
|
|
|
|
, glib
|
|
|
|
, harfbuzz
|
|
|
|
, liblcf
|
|
|
|
, libpng
|
|
|
|
, libsndfile
|
|
|
|
, libvorbis
|
|
|
|
, libxmp
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXi
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, libXScrnSaver
|
|
|
|
, libXxf86vm
|
|
|
|
, mpg123
|
|
|
|
, opusfile
|
|
|
|
, pcre
|
|
|
|
, pixman
|
|
|
|
, SDL2
|
|
|
|
, speexdsp
|
|
|
|
, wildmidi
|
|
|
|
, zlib
|
2022-05-20 11:09:01 +02:00
|
|
|
, libdecor
|
2023-07-10 11:41:50 +02:00
|
|
|
, alsa-lib
|
|
|
|
, asciidoctor
|
|
|
|
, Foundation
|
|
|
|
, AudioUnit
|
|
|
|
, AudioToolbox
|
2022-01-02 19:54:30 +01:00
|
|
|
}:
|
2017-12-25 03:28:19 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "easyrpg-player";
|
2023-07-10 11:41:50 +02:00
|
|
|
version = "0.8";
|
2017-12-25 03:28:19 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "EasyRPG";
|
|
|
|
repo = "Player";
|
|
|
|
rev = version;
|
2023-07-10 11:41:50 +02:00
|
|
|
hash = "sha256-t0sa9ONVVfsiTy+us06vU2bMa4QmmQeYxU395g0WS6w=";
|
2017-12-25 03:28:19 +01:00
|
|
|
};
|
|
|
|
|
2023-07-10 11:41:50 +02:00
|
|
|
patches = [
|
|
|
|
# Fixed compatibility with fmt > 9
|
|
|
|
# Remove when version > 0.8
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-Fix-building-with-fmtlib-10.patch";
|
|
|
|
url = "https://github.com/EasyRPG/Player/commit/ab6286f6d01bada649ea52d1f0881dde7db7e0cf.patch";
|
|
|
|
hash = "sha256-GdSdVFEG1OJCdf2ZIzTP+hSrz+ddhTMBvOPjvYQHy54=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
asciidoctor
|
|
|
|
cmake
|
|
|
|
doxygen
|
|
|
|
pkg-config
|
|
|
|
];
|
2017-12-25 03:28:19 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2022-01-02 19:54:30 +01:00
|
|
|
fmt
|
2017-12-25 03:28:19 +01:00
|
|
|
freetype
|
2018-11-15 22:36:07 +01:00
|
|
|
glib
|
2017-12-25 03:28:19 +01:00
|
|
|
harfbuzz
|
|
|
|
liblcf
|
|
|
|
libpng
|
|
|
|
libsndfile
|
|
|
|
libvorbis
|
2018-11-15 22:36:07 +01:00
|
|
|
libxmp
|
2017-12-25 03:28:19 +01:00
|
|
|
mpg123
|
|
|
|
opusfile
|
2018-11-15 22:36:07 +01:00
|
|
|
pcre
|
2017-12-25 03:28:19 +01:00
|
|
|
pixman
|
2022-01-02 19:54:30 +01:00
|
|
|
SDL2
|
2017-12-25 03:28:19 +01:00
|
|
|
speexdsp
|
|
|
|
zlib
|
2023-07-10 11:41:50 +02:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
alsa-lib
|
|
|
|
libXcursor
|
|
|
|
libXext
|
|
|
|
libXi
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
libXScrnSaver
|
|
|
|
libXxf86vm
|
2022-05-20 11:09:01 +02:00
|
|
|
libdecor
|
2023-07-10 11:41:50 +02:00
|
|
|
wildmidi # until packaged on Darwin
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
Foundation
|
|
|
|
AudioUnit
|
|
|
|
AudioToolbox
|
2017-12-25 03:28:19 +01:00
|
|
|
];
|
|
|
|
|
2023-07-10 11:41:50 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DPLAYER_ENABLE_TESTS=${lib.boolToString doCheck}"
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"all"
|
|
|
|
"man"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildFlags = lib.optionals doCheck [
|
|
|
|
"test_runner_player"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
|
|
mkdir $out/bin
|
|
|
|
mv Package $out/Applications
|
|
|
|
ln -s $out/{Applications/EasyRPG\ Player.app/Contents/MacOS,bin}/EasyRPG\ Player
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
|
|
|
|
|
|
enableParallelChecking = true;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-11-15 22:36:07 +01:00
|
|
|
description = "RPG Maker 2000/2003 and EasyRPG games interpreter";
|
2019-05-05 19:29:25 +02:00
|
|
|
homepage = "https://easyrpg.org/";
|
2017-12-25 03:28:19 +01:00
|
|
|
license = licenses.gpl3;
|
2021-12-31 19:48:55 +01:00
|
|
|
maintainers = with maintainers; [ yana ];
|
2023-07-10 11:41:50 +02:00
|
|
|
platforms = platforms.all;
|
|
|
|
mainProgram = lib.optionalString stdenv.hostPlatform.isDarwin "EasyRPG Player";
|
2017-12-25 03:28:19 +01:00
|
|
|
};
|
|
|
|
}
|