From e6acb0c6a8b18bbb598616cc5845be735ae4e31b Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 8 Apr 2022 18:10:28 +0100 Subject: libretro.citra: fix build --- pkgs/applications/emulators/retroarch/cores.nix | 34 ++++++++++------------- pkgs/applications/emulators/retroarch/hashes.json | 5 ++-- pkgs/applications/emulators/retroarch/update.py | 2 +- 3 files changed, 17 insertions(+), 24 deletions(-) (limited to 'pkgs/applications/emulators/retroarch') diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index 830e16e488c..311f365af9e 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -1,23 +1,22 @@ { lib , stdenv -, SDL , alsa-lib , boost -, buildPackages , bzip2 , cmake , curl , fetchFromGitHub , ffmpeg , fluidsynth +, gcc10Stdenv , gettext , hexdump , hidapi , icu , libaio +, libevdev , libGL , libGLU -, libevdev , libjpeg , libpcap , libpng @@ -32,6 +31,7 @@ , portaudio , python3 , retroarch +, SDL , sfml , snappy , udev @@ -53,6 +53,7 @@ let , description # Check https://github.com/libretro/libretro-core-info for license information , license + , stdenvOverride ? stdenv , src ? (getCoreSrc core) , broken ? false , version ? "unstable-2022-04-05" @@ -62,8 +63,9 @@ let , normalizeCore ? true , ... }@args: - stdenv.mkDerivation ( + stdenvOverride.mkDerivation ( let + inherit (stdenvOverride) hostPlatform; d2u = if normalizeCore then (lib.replaceChars [ "-" ] [ "_" ]) else (x: x); in (rec { @@ -79,12 +81,12 @@ let linux = "unix"; darwin = "osx"; windows = "win"; - }.${stdenv.hostPlatform.parsed.kernel.name} or stdenv.hostPlatform.parsed.kernel.name}" + }.${hostPlatform.parsed.kernel.name} or hostPlatform.parsed.kernel.name}" "ARCH=${{ armv7l = "arm"; armv6l = "arm"; i686 = "x86"; - }.${stdenv.hostPlatform.parsed.cpu.name} or stdenv.hostPlatform.parsed.cpu.name}" + }.${hostPlatform.parsed.cpu.name} or hostPlatform.parsed.cpu.name}" ] ++ (args.makeFlags or [ ]); coreDir = "${placeholder "out"}/lib/retroarch/cores"; @@ -94,9 +96,9 @@ let mkdir -p $out/bin mkdir -p $coreDir - mv ${d2u args.core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary} $coreDir + mv ${d2u args.core}_libretro${hostPlatform.extensions.sharedLibrary} $coreDir makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch-${core} \ - --add-flags "-L $coreDir/${d2u core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary} $@" + --add-flags "-L $coreDir/${d2u core}_libretro${hostPlatform.extensions.sharedLibrary} $@" runHook postInstall ''; @@ -298,19 +300,11 @@ in citra = mkLibRetroCore { core = "citra"; description = "Port of Citra to libretro"; + stdenvOverride = gcc10Stdenv; license = lib.licenses.gpl2Plus; - extraNativeBuildInputs = [ cmake pkg-config ]; - extraBuildInputs = [ libGLU libGL boost ]; + extraBuildInputs = [ libGLU libGL boost ffmpeg nasm ]; makefile = "Makefile"; - cmakeFlags = [ - "-DENABLE_LIBRETRO=ON" - "-DENABLE_QT=OFF" - "-DENABLE_SDL2=OFF" - "-DENABLE_WEB_SERVICE=OFF" - "-DENABLE_DISCORD_PRESENCE=OFF" - ]; - preConfigure = "sed -e '77d' -i externals/cmake-modules/GetGitRevisionDescription.cmake"; - postBuild = "cd src/citra_libretro"; + makeFlags = [ "HAVE_FFMPEG_STATIC=0" ]; }; desmume = mkLibRetroCore { @@ -462,7 +456,7 @@ in dontUseCmakeConfigure = true; dontConfigure = true; makeFlags = [ "EXTERNAL_ZLIB=1" ]; - depsBuildBuild = [ buildPackages.stdenv.cc ]; + depsBuildBuild = [ stdenv.cc ]; }; mame = mkLibRetroCore { diff --git a/pkgs/applications/emulators/retroarch/hashes.json b/pkgs/applications/emulators/retroarch/hashes.json index b7fc01bfb4f..0f660b50b85 100644 --- a/pkgs/applications/emulators/retroarch/hashes.json +++ b/pkgs/applications/emulators/retroarch/hashes.json @@ -105,10 +105,9 @@ "owner": "libretro", "repo": "citra", "rev": "44e01f99016008eff18bc7a28234d1098382358d", - "sha256": "iUp8O0hGCyrbVGoKb95Z3MuFlEzjvaLhgWxo8hAOLIk=", + "sha256": "Vj0d2wAC9UYWgSURL1Qv0LR11g7c789U3W4MV3phv+4=", "fetchSubmodules": true, - "leaveDotGit": true, - "deepClone": true + "leaveDotGit": true }, "desmume": { "owner": "libretro", diff --git a/pkgs/applications/emulators/retroarch/update.py b/pkgs/applications/emulators/retroarch/update.py index 7d858a1dfa5..c75b5af622b 100755 --- a/pkgs/applications/emulators/retroarch/update.py +++ b/pkgs/applications/emulators/retroarch/update.py @@ -29,7 +29,7 @@ CORES = { "citra": { "repo": "citra", "fetch_submodules": True, - "deep_clone": True, + "deep_clone": False, "leave_dot_git": True, }, "desmume": {"repo": "desmume"}, -- cgit 1.4.1