@@ -1,5 +1,5 @@
11{ pname, version, src, branchName
2−, stdenv, lib, fetchFromGitHub, wrapQtAppsHook
2+, stdenv, lib, fetchFromGitHub, fetchpatch, wrapQtAppsHook
33, cmake, pkg-config
44, libpulseaudio, libjack2, alsaLib, sndio, ecasound
55, vulkan-loader, vulkan-headers
@@ -36,15 +36,31 @@ stdenv.mkDerivation rec {
3636 ffmpeg
3737 ];
3838
39+ patches = [
40+ (fetchpatch { # Without this, yuzu tries to read version info from .git which is not present.
41+ url = "https://raw.githubusercontent.com/pineappleEA/Pineapple-Linux/28cbf656e3188b80eda0031d0b2713708ecd630f/inject-git-info.patch";
42+ sha256 = "1zxh5fwdr7jl0aagb3yfwd0995vyyk54f0f748f7c4rqvg6867fd";
43+ })
44+ ];
45+
3946 cmakeFlags = [
4047 "-DENABLE_QT_TRANSLATION=ON"
4148 "-DYUZU_USE_QT_WEB_ENGINE=ON"
4249 "-DUSE_DISCORD_PRESENCE=ON"
50+ # Shows errors about not being able to find .git at runtime if you do not set these
51+ "-DGIT_BRANCH=\"\""
52+ "-DGIT_DESC=\"\""
4353 ];
4454
45− # Trick the configure system. This prevents a check for submodule directories.
4655 preConfigure = ''
56+ # Trick the configure system. This prevents a check for submodule directories.
4757 rm -f .gitmodules
58+
59+ # see https://github.com/NixOS/nixpkgs/issues/114044, setting this through cmakeFlags does not work.
60+ cmakeFlagsArray+=(
61+ "-DTITLE_BAR_FORMAT_IDLE=\"yuzu ${branchName} ${version}\""
62+ "-DTITLE_BAR_FORMAT_RUNNING=\"yuzu ${branchName} ${version} \| \{3\}\""
63+ )
4864 '';
4965
5066 # Fix vulkan detection