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 , vulkan-loader 26 , libXNVCtrl 27 , wayland 28 - , spdlog 29 , glew 30 , glfw 31 , nlohmann_json ··· 49 sha256 = "sha256-bQC0QmkLalxdj4mDEdqvvOFtNwz2T1MpTDuMXGYeQ18="; 50 }; 51 }; 52 in stdenv.mkDerivation rec { 53 pname = "mangohud"; 54 version = "0.6.8"; ··· 67 postUnpack = ''( 68 cd "$sourceRoot/subprojects" 69 cp -R --no-preserve=mode,ownership ${imgui.src} imgui-${imgui.version} 70 - unzip ${imgui.patch} 71 )''; 72 73 patches = [ ··· 102 }) 103 ]; 104 105 mesonFlags = [ 106 "-Duse_system_vulkan=enabled" 107 "-Dvulkan_datadir=${vulkan-headers}/share" 108 "-Dwith_wayland=enabled" 109 - "-Duse_system_spdlog=enabled" 110 ] ++ lib.optionals gamescopeSupport [ 111 "-Dmangoapp_layer=true" 112 "-Dmangoapp=true" ··· 130 libX11 131 libXNVCtrl 132 wayland 133 - spdlog 134 ] ++ lib.optionals gamescopeSupport [ 135 glew 136 glfw
··· 25 , vulkan-loader 26 , libXNVCtrl 27 , wayland 28 , glew 29 , glfw 30 , nlohmann_json ··· 48 sha256 = "sha256-bQC0QmkLalxdj4mDEdqvvOFtNwz2T1MpTDuMXGYeQ18="; 49 }; 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 + }; 72 in stdenv.mkDerivation rec { 73 pname = "mangohud"; 74 version = "0.6.8"; ··· 87 postUnpack = ''( 88 cd "$sourceRoot/subprojects" 89 cp -R --no-preserve=mode,ownership ${imgui.src} imgui-${imgui.version} 90 + cp -R --no-preserve=mode,ownership ${spdlog.src} spdlog-${spdlog.version} 91 )''; 92 93 patches = [ ··· 122 }) 123 ]; 124 125 + postPatch = ''( 126 + cd subprojects 127 + unzip ${imgui.patch} 128 + unzip ${spdlog.patch} 129 + )''; 130 + 131 mesonFlags = [ 132 "-Duse_system_vulkan=enabled" 133 "-Dvulkan_datadir=${vulkan-headers}/share" 134 "-Dwith_wayland=enabled" 135 ] ++ lib.optionals gamescopeSupport [ 136 "-Dmangoapp_layer=true" 137 "-Dmangoapp=true" ··· 155 libX11 156 libXNVCtrl 157 wayland 158 ] ++ lib.optionals gamescopeSupport [ 159 glew 160 glfw