diff --git a/pkgs/applications/emulators/libretro/cores/easyrpg.nix b/pkgs/applications/emulators/libretro/cores/easyrpg.nix index e95d443f06f48..288204631657d 100644 --- a/pkgs/applications/emulators/libretro/cores/easyrpg.nix +++ b/pkgs/applications/emulators/libretro/cores/easyrpg.nix @@ -1,64 +1,73 @@ { lib, fetchFromGitHub, + mkLibretroCore, + nix-update-script, + asciidoctor, cmake, - fetchpatch, + doxygen, + pkg-config, + flac, + fluidsynth, fmt, freetype, + glib, harfbuzz, + lhasa, liblcf, libpng, libsndfile, + libsysprof-capture, libvorbis, libxmp, - mkLibretroCore, mpg123, + nlohmann_json, opusfile, - pcre, + pcre2, pixman, - pkg-config, speexdsp, + wildmidi, }: -mkLibretroCore { +mkLibretroCore rec { core = "easyrpg"; - version = "0.8-unstable-2023-04-29"; + # liblcf needs to be updated before this. + version = "0.8.1.1"; src = fetchFromGitHub { owner = "EasyRPG"; repo = "Player"; - rev = "f8e41f43b619413f95847536412b56f85307d378"; - hash = "sha256-nvWM4czTv/GxY9raomBEn7dmKBeLtSA9nvjMJxc3Q8s="; + rev = version; + hash = "sha256-2a8IdYP6Suc8a+Np5G+xoNzuPxkk9gAgR+sjdKUf89M="; fetchSubmodules = true; }; extraNativeBuildInputs = [ + asciidoctor cmake + doxygen pkg-config ]; extraBuildInputs = [ + flac # needed by libsndfile + fluidsynth fmt freetype + glib harfbuzz + lhasa liblcf libpng libsndfile + libsysprof-capture # needed by glib libvorbis libxmp mpg123 + nlohmann_json opusfile - pcre + pcre2 # needed by glib pixman speexdsp - ]; - patches = [ - # The following patch is shared with easyrpg-player. - # Update when new versions of liblcf and easyrpg-player are released. - # See easyrpg-player expression for details. - (fetchpatch { - name = "0001-Fix-building-with-fmtlib-10.patch"; - url = "https://github.com/EasyRPG/Player/commit/ab6286f6d01bada649ea52d1f0881dde7db7e0cf.patch"; - hash = "sha256-GdSdVFEG1OJCdf2ZIzTP+hSrz+ddhTMBvOPjvYQHy54="; - }) + wildmidi ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" @@ -67,12 +76,13 @@ mkLibretroCore { ]; makefile = "Makefile"; - # Do not update automatically since we want to pin a specific version - passthru.updateScript = null; + # Since liblcf needs to be updated before this, we should not + # use the default unstableGitUpdater. + passthru.updateScript = nix-update-script { }; meta = { description = "EasyRPG Player libretro port"; homepage = "https://github.com/EasyRPG/Player"; - license = lib.licenses.gpl3Only; + license = lib.licenses.gpl3Plus; }; } diff --git a/pkgs/by-name/ea/easyrpg-player/package.nix b/pkgs/by-name/ea/easyrpg-player/package.nix index 888c911625924..6e996f245fbe9 100644 --- a/pkgs/by-name/ea/easyrpg-player/package.nix +++ b/pkgs/by-name/ea/easyrpg-player/package.nix @@ -2,60 +2,55 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, + asciidoctor, cmake, doxygen, pkg-config, - freetype, + alsa-lib, + flac, + fluidsynth, fmt, + freetype, glib, harfbuzz, + lhasa, + libdecor, liblcf, libpng, libsndfile, + libsysprof-capture, libvorbis, - libxmp, libXcursor, libXext, libXi, libXinerama, + libxmp, libXrandr, libXScrnSaver, libXxf86vm, mpg123, + nlohmann_json, opusfile, - pcre, + pcre2, pixman, - SDL2, + sdl3, speexdsp, wildmidi, zlib, - libdecor, - alsa-lib, - asciidoctor, }: stdenv.mkDerivation rec { pname = "easyrpg-player"; - version = "0.8"; + # liblcf needs to be updated before this. + version = "0.8.1.1"; src = fetchFromGitHub { owner = "EasyRPG"; repo = "Player"; rev = version; - hash = "sha256-t0sa9ONVVfsiTy+us06vU2bMa4QmmQeYxU395g0WS6w="; + hash = "sha256-fYSpFhqETkQhRK1/Uws0fWWdCr35+1J4vCPX9ZiQ3ZA="; }; - 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 = [ @@ -67,21 +62,27 @@ stdenv.mkDerivation rec { buildInputs = [ + flac # needed by libsndfile + fluidsynth fmt freetype glib harfbuzz + lhasa liblcf libpng libsndfile + libsysprof-capture # needed by glib libvorbis libxmp mpg123 + nlohmann_json opusfile - pcre + pcre2 # needed by glib pixman - SDL2 + sdl3 speexdsp + wildmidi zlib ] ++ lib.optionals stdenv.hostPlatform.isLinux [ @@ -94,11 +95,12 @@ stdenv.mkDerivation rec { libXScrnSaver libXxf86vm libdecor - wildmidi # until packaged on Darwin ]; cmakeFlags = [ "-DPLAYER_ENABLE_TESTS=${lib.boolToString doCheck}" + # TODO: remove the below once SDL3 becomes default next major release + "-DPLAYER_TARGET_PLATFORM=SDL3" ]; makeFlags = [ @@ -116,14 +118,13 @@ stdenv.mkDerivation rec { ln -s $out/{Applications/EasyRPG\ Player.app/Contents/MacOS,bin}/EasyRPG\ Player ''; - doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; - enableParallelChecking = true; + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; meta = with lib; { description = "RPG Maker 2000/2003 and EasyRPG games interpreter"; homepage = "https://easyrpg.org/"; - license = licenses.gpl3; + license = licenses.gpl3Plus; maintainers = [ ]; platforms = platforms.all; mainProgram = lib.optionalString stdenv.hostPlatform.isDarwin "EasyRPG Player"; diff --git a/pkgs/by-name/li/liblcf/package.nix b/pkgs/by-name/li/liblcf/package.nix index 71e4fb69a3b99..4b4fe0083864a 100644 --- a/pkgs/by-name/li/liblcf/package.nix +++ b/pkgs/by-name/li/liblcf/package.nix @@ -2,24 +2,28 @@ lib, stdenv, fetchFromGitHub, + nix-update-script, autoreconfHook, pkg-config, expat, icu74, + inih, }: stdenv.mkDerivation rec { pname = "liblcf"; - version = "0.8"; + # When updating this package, you should probably also update + # easyrpg-player and libretro.easyrpg + version = "0.8.1"; src = fetchFromGitHub { owner = "EasyRPG"; repo = "liblcf"; rev = version; - hash = "sha256-jJGIsNw7wplTL5FBWGL8osb9255o9ZaWgl77R+RLDMM="; + hash = "sha256-jIk55+n8wSk3Z3FPR18SE7U3OuWwmp2zJgvSZQBB2l0="; }; - dtrictDeps = true; + strictDeps = true; nativeBuildInputs = [ autoreconfHook @@ -29,6 +33,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ expat icu74 + inih ]; enableParallelBuilding = true; @@ -36,6 +41,8 @@ stdenv.mkDerivation rec { doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "Library to handle RPG Maker 2000/2003 and EasyRPG projects"; homepage = "https://github.com/EasyRPG/liblcf";