Merge pull request #185016 from kira-bruneau/mangohud

mangohud: statically link spdlog

authored by Kira Bruneau and committed by GitHub 72061fe3 66c94cd5

+28 -4
+28 -4
pkgs/tools/graphics/mangohud/default.nix
··· 25 25 , vulkan-loader 26 26 , libXNVCtrl 27 27 , wayland 28 - , spdlog 29 28 , glew 30 29 , glfw 31 30 , nlohmann_json ··· 49 48 sha256 = "sha256-bQC0QmkLalxdj4mDEdqvvOFtNwz2T1MpTDuMXGYeQ18="; 50 49 }; 51 50 }; 51 + 52 + # Derived from subprojects/spdlog.wrap 53 + # 54 + # NOTE: We only statically link spdlog due to a bug in pressure-vessel: 55 + # https://github.com/ValveSoftware/steam-runtime/issues/511 56 + # 57 + # Once this fix is released upstream, we should switch back to using 58 + # the system provided spdlog 59 + spdlog = rec { 60 + version = "1.8.5"; 61 + src = fetchFromGitHub { 62 + owner = "gabime"; 63 + repo = "spdlog"; 64 + rev = "refs/tags/v${version}"; 65 + sha256 = "sha256-D29jvDZQhPscaOHlrzGN1s7/mXlcsovjbqYpXd7OM50="; 66 + }; 67 + patch = fetchurl { 68 + url = "https://wrapdb.mesonbuild.com/v2/spdlog_${version}-1/get_patch"; 69 + sha256 = "sha256-PDjyddV5KxKGORECWUMp6YsXc3kks0T5gxKrCZKbdL4="; 70 + }; 71 + }; 52 72 in stdenv.mkDerivation rec { 53 73 pname = "mangohud"; 54 74 version = "0.6.8"; ··· 67 87 postUnpack = ''( 68 88 cd "$sourceRoot/subprojects" 69 89 cp -R --no-preserve=mode,ownership ${imgui.src} imgui-${imgui.version} 70 - unzip ${imgui.patch} 90 + cp -R --no-preserve=mode,ownership ${spdlog.src} spdlog-${spdlog.version} 71 91 )''; 72 92 73 93 patches = [ ··· 102 122 }) 103 123 ]; 104 124 125 + postPatch = ''( 126 + cd subprojects 127 + unzip ${imgui.patch} 128 + unzip ${spdlog.patch} 129 + )''; 130 + 105 131 mesonFlags = [ 106 132 "-Duse_system_vulkan=enabled" 107 133 "-Dvulkan_datadir=${vulkan-headers}/share" 108 134 "-Dwith_wayland=enabled" 109 - "-Duse_system_spdlog=enabled" 110 135 ] ++ lib.optionals gamescopeSupport [ 111 136 "-Dmangoapp_layer=true" 112 137 "-Dmangoapp=true" ··· 130 155 libX11 131 156 libXNVCtrl 132 157 wayland 133 - spdlog 134 158 ] ++ lib.optionals gamescopeSupport [ 135 159 glew 136 160 glfw