From 3f0e78e5b8912fc8f2596f0646b073ec465ea6ee Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 19 Nov 2024 13:15:24 +0000 Subject: [PATCH] libretro.citra: unstable-2024-01-24 -> unstable-2024-04-01, move to retroarch/cores --- .../emulators/retroarch/cores.nix | 21 +------- .../emulators/retroarch/cores/citra.nix | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 pkgs/applications/emulators/retroarch/cores/citra.nix diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index e4f4232cfcb6..3ea8b478a469 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -127,26 +127,7 @@ lib.makeScope newScope (self: rec { bsnes-mercury-performance = self.bsnes-mercury.override { withProfile = "performance"; }; - citra = mkLibretroCore rec { - core = "citra"; - extraBuildInputs = [ libGLU libGL boost ffmpeg_6 nasm ]; - makefile = "Makefile"; - makeFlags = [ - "HAVE_FFMPEG_STATIC=0" - # https://github.com/libretro/citra/blob/1a66174355b5ed948de48ef13c0ed508b6d6169f/Makefile#L87-L90 - "GIT_REV=${(getCoreSrc core).rev}" - "GIT_DESC=${lib.substring 0 8 (getCoreSrc core).rev}" - "GIT_BRANCH=master" - "BUILD_DATE=01/01/1970_00:00" - ]; - # FIXME: build fail with GCC13: - # error: 'mic_device_name' has incomplete type - stdenv = gcc12Stdenv; - meta = { - description = "Port of Citra to libretro"; - license = lib.licenses.gpl2Plus; - }; - }; + citra = self.callPackage ./cores/citra.nix { }; desmume = mkLibretroCore { core = "desmume"; diff --git a/pkgs/applications/emulators/retroarch/cores/citra.nix b/pkgs/applications/emulators/retroarch/cores/citra.nix new file mode 100644 index 000000000000..1a826fed9eaa --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/citra.nix @@ -0,0 +1,52 @@ +{ + lib, + fetchFromGitHub, + boost, + ffmpeg_6, + gcc12Stdenv, + libGL, + libGLU, + mkLibretroCore, + nasm, +}: +mkLibretroCore rec { + core = "citra"; + version = "unstable-2024-04-01"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "citra"; + # TODO: upstream migrated to cmake, this is the latest rev without it + rev = "36b600692905ebd457cbc9321e2f521938eced16"; + hash = "sha256-ZJcsdFgLBda4xS4Z6I8Pu+6B9TYwak//0CbloDK3Yg0="; + fetchSubmodules = true; + }; + + makefile = "Makefile"; + makeFlags = [ + "HAVE_FFMPEG_STATIC=0" + # https://github.com/libretro/citra/blob/1a66174355b5ed948de48ef13c0ed508b6d6169f/Makefile#L87-L90 + "GIT_REV=${src.rev}" + "GIT_DESC=${lib.substring 0 7 src.rev}" + "GIT_BRANCH=master" + "BUILD_DATE=01/01/1970_00:00" + ]; + + extraBuildInputs = [ + boost + ffmpeg_6 + libGL + libGLU + nasm + ]; + + # FIXME: build fail with GCC13: + # error: 'mic_device_name' has incomplete type + stdenv = gcc12Stdenv; + + meta = { + description = "Port of Citra to libretro"; + homepage = "https://github.com/libretro/citra"; + license = lib.licenses.gpl2Plus; + }; +}