From 1556d2c6de2ba0d623d035806c3ba8268dcbb910 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Wed, 20 Nov 2024 12:43:15 +0000 Subject: [PATCH] libretro.parallel-n64: move to retroarch/cores --- .../emulators/retroarch/cores.nix | 19 +-------- .../retroarch/cores/parallel-n64.nix | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+), 18 deletions(-) create mode 100644 pkgs/applications/emulators/retroarch/cores/parallel-n64.nix diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index f3d922b7a7a7..65c6a342dde3 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -209,24 +209,7 @@ lib.makeScope newScope (self: rec { opera = self.callPackage ./cores/opera.nix { }; - parallel-n64 = mkLibretroCore { - core = "parallel-n64"; - extraBuildInputs = [ libGLU libGL libpng ]; - makefile = "Makefile"; - makeFlags = [ - "HAVE_PARALLEL=1" - "HAVE_PARALLEL_RSP=1" - "ARCH=${stdenv.hostPlatform.parsed.cpu.name}" - ]; - postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 '' - sed -i -e '1 i\CPUFLAGS += -DARM_FIX -DNO_ASM -DARM_ASM -DDONT_WANT_ARM_OPTIMIZATIONS -DARM64' Makefile \ - && sed -i -e 's,CPUFLAGS :=,,g' Makefile - ''; - meta = { - description = "Parallel Mupen64plus rewrite for libretro"; - license = lib.licenses.gpl3Only; - }; - }; + parallel-n64 = self.callPackage ./cores/parallel-n64.nix { }; pcsx2 = mkLibretroCore { core = "pcsx2"; diff --git a/pkgs/applications/emulators/retroarch/cores/parallel-n64.nix b/pkgs/applications/emulators/retroarch/cores/parallel-n64.nix new file mode 100644 index 000000000000..f6ba71d47c63 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/cores/parallel-n64.nix @@ -0,0 +1,42 @@ +{ + lib, + stdenv, + fetchFromGitHub, + libGL, + libGLU, + libpng, + mkLibretroCore, +}: +mkLibretroCore { + core = "parallel-n64"; + version = "unstable-2024-10-21"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "parallel-n64"; + rev = "e372c5e327dcd649e9d840ffc3d88480b6866eda"; + hash = "sha256-q4octB5XDdl4PtLYVZfBgydVBNaOwzu9dPBY+Y68lVo="; + }; + + extraBuildInputs = [ + libGLU + libGL + libpng + ]; + makefile = "Makefile"; + makeFlags = [ + "HAVE_PARALLEL=1" + "HAVE_PARALLEL_RSP=1" + "ARCH=${stdenv.hostPlatform.parsed.cpu.name}" + ]; + postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 '' + sed -i -e '1 i\CPUFLAGS += -DARM_FIX -DNO_ASM -DARM_ASM -DDONT_WANT_ARM_OPTIMIZATIONS -DARM64' Makefile \ + && sed -i -e 's,CPUFLAGS :=,,g' Makefile + ''; + + meta = { + description = "Parallel Mupen64plus rewrite for libretro"; + homepage = "https://github.com/libretro/parallel-n64"; + license = lib.licenses.gpl3Only; + }; +}