From 05526810bb2c97152ab5fbbaf4715c72f88fcbe7 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Mon, 25 Sep 2023 21:49:41 +0100 Subject: [PATCH 1/3] beetle-pce: init at unstable-2023-09-24 --- pkgs/applications/emulators/retroarch/cores.nix | 12 +++++++++++- pkgs/applications/emulators/retroarch/hashes.json | 6 ++++++ .../applications/emulators/retroarch/update_cores.py | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index 216d9c14df20..a06573d0af53 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -100,12 +100,22 @@ in }; }; + beetle-pce = mkLibretroCore { + core = "mednafen-pce"; + src = getCoreSrc "beetle-pce"; + makefile = "Makefile"; + meta = { + description = "Port of Mednafen's PC Engine core to libretro"; + license = lib.licenses.gpl2Only; + }; + }; + beetle-pce-fast = mkLibretroCore { core = "mednafen-pce-fast"; src = getCoreSrc "beetle-pce-fast"; makefile = "Makefile"; meta = { - description = "Port of Mednafen's PC Engine core to libretro"; + description = "Port of Mednafen's PC Engine fast core to libretro"; license = lib.licenses.gpl2Only; }; }; diff --git a/pkgs/applications/emulators/retroarch/hashes.json b/pkgs/applications/emulators/retroarch/hashes.json index 0ee7ff4d7931..f1099967fe78 100644 --- a/pkgs/applications/emulators/retroarch/hashes.json +++ b/pkgs/applications/emulators/retroarch/hashes.json @@ -29,6 +29,12 @@ "rev": "65460e3a9ad529f6901caf669abbda11f437ab55", "hash": "sha256-+xfD1ZMKtbv5Lp12+5RM7Vl3eEF38kykKW8wj/2EN5w=" }, + "beetle-pce": { + "owner": "libretro", + "repo": "beetle-pce-libretro", + "rev": "541463bd937dad175aec09c2a0c8d6a52d175386", + "hash": "sha256-wWS9reb6aN71Q7OlGst+32T8XX1yMCSOHUKHkXht3hg=" + }, "beetle-pce-fast": { "owner": "libretro", "repo": "beetle-pce-fast-libretro", diff --git a/pkgs/applications/emulators/retroarch/update_cores.py b/pkgs/applications/emulators/retroarch/update_cores.py index 8e45b7f4fdf3..5348092c5247 100755 --- a/pkgs/applications/emulators/retroarch/update_cores.py +++ b/pkgs/applications/emulators/retroarch/update_cores.py @@ -17,6 +17,7 @@ CORES = { "beetle-gba": {"repo": "beetle-gba-libretro"}, "beetle-lynx": {"repo": "beetle-lynx-libretro"}, "beetle-ngp": {"repo": "beetle-ngp-libretro"}, + "beetle-pce": {"repo": "beetle-pce-libretro"}, "beetle-pce-fast": {"repo": "beetle-pce-fast-libretro"}, "beetle-pcfx": {"repo": "beetle-pcfx-libretro"}, "beetle-psx": {"repo": "beetle-psx-libretro"}, From 4bb18351808181ab8def61fa511194adc3988f4b Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Mon, 25 Sep 2023 22:14:44 +0100 Subject: [PATCH 2/3] libretro.mame: fix build --- pkgs/applications/emulators/retroarch/cores.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index a06573d0af53..2f055299adfe 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -516,15 +516,11 @@ in core = "mame"; extraNativeBuildInputs = [ python3 ]; extraBuildInputs = [ alsa-lib libGLU libGL ]; + # Setting this is breaking compilation of src/3rdparty/genie for some reason + makeFlags = [ "ARCH=" ]; meta = { description = "Port of MAME to libretro"; license = with lib.licenses; [ bsd3 gpl2Plus ]; - # Build fail with errors: - # gcc: warning: : linker input file unused because linking not done - # gcc: error: : linker input file not found: No such file or directory - # Removing it from platforms instead of marking as broken to allow - # retroarchFull to be built - platforms = [ ]; }; }; From c9fc96a159d9fc039cb848b1f247c5c41859473d Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Mon, 25 Sep 2023 23:54:45 +0100 Subject: [PATCH 3/3] libretro.citra: make build reproducible --- pkgs/applications/emulators/retroarch/cores.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index 2f055299adfe..d67ae6b5318e 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -301,7 +301,11 @@ in core = "citra"; extraBuildInputs = [ libGLU libGL boost ffmpeg nasm ]; makefile = "Makefile"; - makeFlags = [ "HAVE_FFMPEG_STATIC=0" ]; + makeFlags = [ + "HAVE_FFMPEG_STATIC=0" + # https://github.com/libretro/citra/blob/1a66174355b5ed948de48ef13c0ed508b6d6169f/Makefile#L90 + "BUILD_DATE=01/01/1970_00:00" + ]; meta = { description = "Port of Citra to libretro"; license = lib.licenses.gpl2Plus;