From f5d478483cea965fbf97d69f422fa820362d77d5 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Sat, 28 Dec 2024 23:34:51 +0000 Subject: [PATCH] libretro.mame2016: unvendor rapidjson Fix build with GCC 14. --- .../emulators/libretro/cores/mame2016.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/emulators/libretro/cores/mame2016.nix b/pkgs/applications/emulators/libretro/cores/mame2016.nix index 31e929b7089a..221940e06eaa 100644 --- a/pkgs/applications/emulators/libretro/cores/mame2016.nix +++ b/pkgs/applications/emulators/libretro/cores/mame2016.nix @@ -4,6 +4,7 @@ fetchFromGitHub, mkLibretroCore, python3, + rapidjson, }: mkLibretroCore { core = "mame2016"; @@ -16,14 +17,22 @@ mkLibretroCore { hash = "sha256-IsM7f/zlzvomVOYlinJVqZllUhDfy4NNTeTPtNmdVak="; }; + postPatch = '' + rm -r 3rdparty/rapidjson + ln -s ${lib.getInclude rapidjson} 3rdparty/rapidjson + ''; + patches = [ ./patches/mame2016-python311.patch ]; extraNativeBuildInputs = [ python3 ]; extraBuildInputs = [ alsa-lib ]; makeFlags = [ "PYTHON_EXECUTABLE=python3" ]; - # Build failures when this is set to a bigger number - NIX_BUILD_CORES = 8; - # Fix build errors in GCC13 - NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive"; + + env = { + # Build failures when this is set to a bigger number + NIX_BUILD_CORES = 8; + # Fix build errors in GCC 13 + NIX_CFLAGS_COMPILE = "-Wno-error -fpermissive"; + }; meta = { description = "Port of MAME ~2016 to libretro, compatible with MAME 0.174 sets";