retroarch: prefer wrapper over patch
* Remove the nixpkgs specific patch and configure the install paths to assets and core info with the wrapper. (The path to the cores themselves is configured in the wrapper, before *and* after this change.) Less rebuilds, easier maintenance. * Remove the withAssets/withCoreInfo parameters from retroarch expr as they make little sense to keep now. * Keep passing --disable-update_assets and --disable-update_core_info configure flags, as I think nixpkgs users prefer a declarative setup.
This commit is contained in:
parent
f18b8ec8c6
commit
fbab0d0d31
@ -2,8 +2,6 @@
|
||||
, stdenv
|
||||
, nixosTests
|
||||
, enableNvidiaCgToolkit ? false
|
||||
, withAssets ? false
|
||||
, withCoreInfo ? false
|
||||
, withGamemode ? stdenv.isLinux
|
||||
, withVulkan ? stdenv.isLinux
|
||||
, withWayland ? stdenv.isLinux
|
||||
@ -61,10 +59,6 @@ stdenv.mkDerivation rec {
|
||||
rev = "v${version}";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./use-default-values-for-libretro_info_path-assets_directory.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapQtAppsHook ] ++
|
||||
lib.optional withWayland wayland ++
|
||||
lib.optional (runtimeLibs != [ ]) makeWrapper;
|
||||
@ -109,14 +103,8 @@ stdenv.mkDerivation rec {
|
||||
"--enable-systemmbedtls"
|
||||
"--disable-builtinzlib"
|
||||
"--disable-builtinflac"
|
||||
] ++
|
||||
lib.optionals withAssets [
|
||||
"--disable-update_assets"
|
||||
"--with-assets_dir=${retroarch-assets}/share"
|
||||
] ++
|
||||
lib.optionals withCoreInfo [
|
||||
"--disable-update_core_info"
|
||||
"--with-core_info_dir=${libretro-core-info}/share"
|
||||
] ++
|
||||
lib.optionals stdenv.isLinux [
|
||||
"--enable-dbus"
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 6960855a0cdfd671d214030260b340a73878af52 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Kenji Okada <thiagokokada@gmail.com>
|
||||
Date: Fri, 23 Dec 2022 21:42:15 +0000
|
||||
Subject: [PATCH] Use default values for libretro_info_path/assets_directories
|
||||
|
||||
---
|
||||
configuration.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configuration.c b/configuration.c
|
||||
index d9ab8370c4..15b575d8a2 100644
|
||||
--- a/configuration.c
|
||||
+++ b/configuration.c
|
||||
@@ -1483,7 +1483,7 @@ static struct config_path_setting *populate_settings_path(
|
||||
SETTING_PATH("core_options_path",
|
||||
settings->paths.path_core_options, false, NULL, true);
|
||||
SETTING_PATH("libretro_info_path",
|
||||
- settings->paths.path_libretro_info, false, NULL, true);
|
||||
+ settings->paths.path_libretro_info, false, NULL, false);
|
||||
SETTING_PATH("content_database_path",
|
||||
settings->paths.path_content_database, false, NULL, true);
|
||||
SETTING_PATH("cheat_database_path",
|
||||
@@ -1539,7 +1539,7 @@ static struct config_path_setting *populate_settings_path(
|
||||
SETTING_PATH("core_assets_directory",
|
||||
settings->paths.directory_core_assets, true, NULL, true);
|
||||
SETTING_PATH("assets_directory",
|
||||
- settings->paths.directory_assets, true, NULL, true);
|
||||
+ settings->paths.directory_assets, true, NULL, false);
|
||||
SETTING_PATH("dynamic_wallpapers_directory",
|
||||
settings->paths.directory_dynamic_wallpapers, true, NULL, true);
|
||||
SETTING_PATH("thumbnails_directory",
|
||||
--
|
||||
2.38.1
|
||||
|
@ -2672,12 +2672,11 @@ with pkgs;
|
||||
{ inherit retroarch settings; };
|
||||
|
||||
retroarch = wrapRetroArch {
|
||||
retroarch = retroarchBare.override {
|
||||
withAssets = true;
|
||||
withCoreInfo = true;
|
||||
};
|
||||
retroarch = retroarchBare;
|
||||
settings = {
|
||||
assets_directory = "${retroarch-assets}/share/retroarch/assets";
|
||||
joypad_autoconfig_dir = "${retroarch-joypad-autoconfig}/share/libretro/autoconfig";
|
||||
libretro_info_path = "${libretro-core-info}/share/retroarch/cores";
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user