Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 32 additions & 22 deletions pkgs/applications/emulators/libretro/cores/easyrpg.nix
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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;
};
}
53 changes: 27 additions & 26 deletions pkgs/by-name/ea/easyrpg-player/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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 [
Expand All @@ -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 = [
Expand All @@ -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";
Expand Down
13 changes: 10 additions & 3 deletions pkgs/by-name/li/liblcf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,13 +33,16 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [
expat
icu74
inih
];

enableParallelBuilding = true;
enableParallelChecking = true;

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";
Expand Down