Merge pull request #146577 from thiagokokada/bump-retroarch-1_9_13_2-take2
retroarch: 1.9.2 -> 1.9.13.2
This commit is contained in:
commit
91fb3fa4b3
2 changed files with 106 additions and 29 deletions
|
@ -1,53 +1,104 @@
|
|||
{ lib, stdenv, fetchFromGitHub, which, pkg-config, makeWrapper
|
||||
, ffmpeg, libGLU, libGL, freetype, libxml2, python3
|
||||
, libobjc, AppKit, Foundation
|
||||
, alsa-lib ? null
|
||||
, libdrm ? null
|
||||
, libpulseaudio ? null
|
||||
, libv4l ? null
|
||||
, libX11 ? null
|
||||
, libXdmcp ? null
|
||||
, libXext ? null
|
||||
, libXxf86vm ? null
|
||||
, mesa ? null
|
||||
, SDL2 ? null
|
||||
, udev ? null
|
||||
, enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null
|
||||
, withVulkan ? stdenv.isLinux, vulkan-loader ? null
|
||||
, wayland
|
||||
{ lib
|
||||
, stdenv
|
||||
, enableNvidiaCgToolkit ? false
|
||||
, withVulkan ? stdenv.isLinux
|
||||
, alsa-lib
|
||||
, AppKit
|
||||
, fetchFromGitHub
|
||||
, ffmpeg
|
||||
, Foundation
|
||||
, freetype
|
||||
, libdrm
|
||||
, libGL
|
||||
, libGLU
|
||||
, libobjc
|
||||
, libpulseaudio
|
||||
, libv4l
|
||||
, libX11
|
||||
, libXdmcp
|
||||
, libXext
|
||||
, libxkbcommon
|
||||
, libxml2
|
||||
, libXxf86vm
|
||||
, makeWrapper
|
||||
, mesa
|
||||
, nvidia_cg_toolkit
|
||||
, pkg-config
|
||||
, python3
|
||||
, SDL2
|
||||
, substituteAll
|
||||
, udev
|
||||
, vulkan-loader
|
||||
, wayland
|
||||
, which
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
libretroSuperSrc = fetchFromGitHub {
|
||||
owner = "libretro";
|
||||
repo = "libretro-super";
|
||||
sha256 = "sha256-4WB6/1DDec+smhMJKLCxWb4+LQlZN8v2ik69saKixkE=";
|
||||
rev = "fa70d9843838df719623094965bd447e4db0d1b4";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "retroarch-bare";
|
||||
# FIXME: retroarch >=1.9.3 doesn't load the cores
|
||||
version = "1.9.2";
|
||||
version = "1.9.13.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libretro";
|
||||
repo = "RetroArch";
|
||||
sha256 = "sha256-Dwv0hl+d99FbVMG4KnkjO1aYfAw0m4x+zvrbyb/wOX8=";
|
||||
sha256 = "sha256-fehHchn+o9QM2wIK6zYamnbFvQda32Gw0rJk8Orx00U=";
|
||||
rev = "v${version}";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wayland ]
|
||||
++ optional withVulkan makeWrapper;
|
||||
patches = [
|
||||
# FIXME: The `retroarch.cfg` file is created once in the first run and only
|
||||
# updated when needed. However, the file may have out-of-date paths
|
||||
# In case of issues (e.g.: cores are not loading), please delete the
|
||||
# `$XDG_CONFIG_HOME/retroarch/retroarch.cfg` file
|
||||
# See: https://github.com/libretro/RetroArch/issues/13251
|
||||
./fix-config.patch
|
||||
];
|
||||
|
||||
buildInputs = [ ffmpeg freetype libxml2 libGLU libGL python3 SDL2 which ]
|
||||
++ optional enableNvidiaCgToolkit nvidia_cg_toolkit
|
||||
++ optional withVulkan vulkan-loader
|
||||
++ optionals stdenv.isDarwin [ libobjc AppKit Foundation ]
|
||||
++ optionals stdenv.isLinux [ alsa-lib libdrm libpulseaudio libv4l libX11
|
||||
libXdmcp libXext libXxf86vm mesa udev
|
||||
wayland libxkbcommon ];
|
||||
postPatch = ''
|
||||
substituteInPlace retroarch.cfg \
|
||||
--replace "@libretro_directory@" "$out/lib" \
|
||||
--replace "@libretro_info_path@" "$out/share/libretro/info" \
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config wayland ] ++
|
||||
optional withVulkan makeWrapper;
|
||||
|
||||
buildInputs = [ ffmpeg freetype libxml2 libGLU libGL python3 SDL2 which ] ++
|
||||
optional enableNvidiaCgToolkit nvidia_cg_toolkit ++
|
||||
optional withVulkan vulkan-loader ++
|
||||
optionals stdenv.isDarwin [ libobjc AppKit Foundation ] ++
|
||||
optionals stdenv.isLinux [
|
||||
alsa-lib
|
||||
libdrm
|
||||
libpulseaudio
|
||||
libv4l
|
||||
libX11
|
||||
libXdmcp
|
||||
libXext
|
||||
libXxf86vm
|
||||
mesa
|
||||
udev
|
||||
wayland
|
||||
libxkbcommon
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configureFlags = lib.optionals stdenv.isLinux [ "--enable-kms" "--enable-egl" ];
|
||||
|
||||
postInstall = optionalString withVulkan ''
|
||||
mkdir -p $out/share/libretro/info
|
||||
# TODO: ideally each core should have its own core information
|
||||
cp -r ${libretroSuperSrc}/dist/info/* $out/share/libretro/info
|
||||
wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
|
||||
'';
|
||||
|
||||
|
|
26
pkgs/misc/emulators/retroarch/fix-config.patch
Normal file
26
pkgs/misc/emulators/retroarch/fix-config.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
diff --git a/retroarch.cfg b/retroarch.cfg
|
||||
index cdcb199c9f..08b9b1cf10 100644
|
||||
--- a/retroarch.cfg
|
||||
+++ b/retroarch.cfg
|
||||
@@ -681,7 +681,7 @@
|
||||
# menu_show_online_updater = true
|
||||
|
||||
# If disabled, will hide the ability to update cores (and core info files) inside the menu.
|
||||
-# menu_show_core_updater = true
|
||||
+menu_show_core_updater = false
|
||||
|
||||
# If disabled, the libretro core will keep running in the background when we
|
||||
# are in the menu.
|
||||
@@ -823,10 +823,10 @@
|
||||
# rgui_browser_directory =
|
||||
|
||||
# Core directory for libretro core implementations.
|
||||
-# libretro_directory =
|
||||
+libretro_directory = @libretro_directory@
|
||||
|
||||
# Core info directory for libretro core information.
|
||||
-# libretro_info_path =
|
||||
+libretro_info_path = @libretro_info_path@
|
||||
|
||||
# Path to content database directory.
|
||||
# content_database_path =
|
Loading…
Reference in a new issue