yuzu: use vendored ffmpeg, audit the rest of the deps

Upcoming yuzu version will depend on internal ffmpeg API, so we have to do this :(
This commit is contained in:
K900 2024-02-03 19:29:20 +03:00
parent f62b957c86
commit f5662b251f

View File

@ -1,10 +1,9 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, nix-update-script
, wrapQtAppsHook
, alsa-lib
, autoconf
, boost
, catch2_3
, cmake
@ -12,37 +11,26 @@
, cpp-jwt
, cubeb
, discord-rpc
, doxygen
, enet
, ffmpeg
, fmt
, glslang
, httplib
, inih
, libjack2
, libopus
, libpulseaudio
, libusb1
, libva
, libzip
, lz4
, nlohmann_json
, nv-codec-headers-12
, nx_tzdb
, perl
, pkg-config
, python3
, qtbase
, qtmultimedia
, qttools
, qtwayland
, qtwebengine
, rapidjson
, SDL2
, sndio
, speexdsp
, udev
, vulkan-headers
, vulkan-loader
, yasm
, zlib
, zstd
}:
@ -60,10 +48,9 @@ stdenv.mkDerivation(finalAttrs: {
nativeBuildInputs = [
cmake
doxygen
perl
glslang
pkg-config
python3
qttools
wrapQtAppsHook
];
@ -72,7 +59,6 @@ stdenv.mkDerivation(finalAttrs: {
# don't get picked up by accident
vulkan-headers
alsa-lib
boost
catch2_3
cpp-jwt
@ -80,30 +66,31 @@ stdenv.mkDerivation(finalAttrs: {
discord-rpc
# intentionally omitted: dynarmic - prefer vendored version for compatibility
enet
ffmpeg
# vendored ffmpeg deps
autoconf
yasm
libva # for accelerated video decode on non-nvidia
nv-codec-headers-12 # for accelerated video decode on nvidia
# end vendored ffmpeg deps
fmt
glslang
httplib
inih
libjack2
# intentionally omitted: gamemode - loaded dynamically at runtime
# intentionally omitted: httplib - upstream requires an older version than what we have
libopus
libpulseaudio
libusb1
libva
libzip
# intentionally omitted: LLVM - heavy, only used for stack traces in the debugger
lz4
nlohmann_json
qtbase
qtmultimedia
qttools
qtwayland
qtwebengine
rapidjson
# intentionally omitted: renderdoc - heavy, developer only
SDL2
sndio
speexdsp
udev
# not packaged in nixpkgs: simpleini
# intentionally omitted: stb - header only libraries, vendor uses git snapshot
# not packaged in nixpkgs: vulkan-memory-allocator
# intentionally omitted: xbyak - prefer vendored version for compatibility
zlib
zstd
@ -127,6 +114,9 @@ stdenv.mkDerivation(finalAttrs: {
"-DYUZU_USE_EXTERNAL_SDL2=OFF"
"-DYUZU_USE_EXTERNAL_VULKAN_HEADERS=OFF"
# don't use system ffmpeg, yuzu uses internal APIs
"-DYUZU_USE_BUNDLED_FFMPEG=ON"
# don't check for missing submodules
"-DYUZU_CHECK_SUBMODULES=OFF"
@ -140,6 +130,9 @@ stdenv.mkDerivation(finalAttrs: {
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" # We provide this deterministically
];
# Does some handrolled SIMD
env.NIX_CFLAGS_COMPILE = "-msse4.1";
# Fixes vulkan detection.
# FIXME: patchelf --add-rpath corrupts the binary for some reason, investigate
qtWrapperArgs = [