torzu: use system libs and unbreak aarch64-linux (#377059)

authored by Peder Bergebakken Sundt and committed by GitHub e2199038 d574c98b

+44 -36
+9
pkgs/by-name/si/simpleini/package.nix
··· 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 gtest, 7 nix-update-script, ··· 30 strictDeps = true; 31 32 cmakeFlags = [ (lib.cmakeBool "SIMPLEINI_USE_SYSTEM_GTEST" true) ]; 33 34 passthru.updateScript = nix-update-script { }; 35
··· 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 + fetchpatch, 6 cmake, 7 gtest, 8 nix-update-script, ··· 31 strictDeps = true; 32 33 cmakeFlags = [ (lib.cmakeBool "SIMPLEINI_USE_SYSTEM_GTEST" true) ]; 34 + 35 + patches = [ 36 + # Fixes for cmake export from master, can be removed after the next release 37 + (fetchpatch { 38 + url = "https://github.com/brofield/simpleini/commit/aeacf861a8ad8add5f4974792a88ffea393e41db.patch"; 39 + hash = "sha256-lpoQHff8JwfljMUxL6Y2MqsGDZtDPjnOIKSIJ1rqrAI="; 40 + }) 41 + ]; 42 43 passthru.updateScript = nix-update-script { }; 44
+14
pkgs/by-name/to/torzu/fix-aarch64-linux-build.patch
···
··· 1 + diff --git a/src/video_core/host1x/vic.cpp b/src/video_core/host1x/vic.cpp 2 + index 3ad56bb80..57e6adbf8 100644 3 + --- a/src/video_core/host1x/vic.cpp 4 + +++ b/src/video_core/host1x/vic.cpp 5 + @@ -13,7 +13,8 @@ 6 + #endif 7 + #elif defined(ARCHITECTURE_arm64) 8 + #pragma GCC diagnostic push 9 + -#pragma GCC diagnostic ignored "-Wimplicit-int-conversion" 10 + +#pragma GCC diagnostic ignored "-Wconversion" 11 + +#pragma GCC diagnostic ignored "-Wshadow" 12 + #include <sse2neon.h> 13 + #pragma GCC diagnostic pop 14 + #endif
+21 -36
pkgs/by-name/to/torzu/package.nix
··· 2 lib, 3 stdenv, 4 SDL2, 5 - autoconf, 6 boost, 7 catch2_3, 8 cmake, ··· 18 glslang, 19 libopus, 20 libusb1, 21 - libva, 22 lz4, 23 python3, 24 unzip, 25 nix-update-script, 26 nlohmann_json, 27 - nv-codec-headers-12, 28 pkg-config, 29 qt6, 30 vulkan-headers, 31 vulkan-loader, 32 - yasm, 33 simpleini, 34 zlib, 35 vulkan-memory-allocator, ··· 99 ./fix-udp-protocol.patch 100 # Use specific boost::asio includes and update to modern io_context 101 ./fix-udp-client.patch 102 ]; 103 104 nativeBuildInputs = [ ··· 123 # intentionally omitted: dynarmic - prefer vendored version for compatibility 124 enet 125 126 - # ffmpeg deps (also includes vendored) 127 - # we do not use internal ffmpeg because cuda errors 128 - autoconf 129 - yasm 130 - libva # for accelerated video decode on non-nvidia 131 - nv-codec-headers-12 # for accelerated video decode on nvidia 132 ffmpeg-headless 133 - # end ffmpeg deps 134 - 135 fmt 136 # intentionally omitted: gamemode - loaded dynamically at runtime 137 # intentionally omitted: httplib - upstream requires an older version than what we have ··· 147 # intentionally omitted: renderdoc - heavy, developer only 148 SDL2 149 # intentionally omitted: stb - header only libraries, vendor uses git snapshot 150 vulkan-memory-allocator 151 # intentionally omitted: xbyak - prefer vendored version for compatibility 152 zlib 153 zstd ··· 157 # making the build fail, as that path does not exist 158 dontFixCmake = true; 159 160 cmakeFlags = [ 161 # actually has a noticeable performance impact 162 (lib.cmakeBool "YUZU_ENABLE_LTO" true) ··· 167 168 # use system libraries 169 # NB: "external" here means "from the externals/ directory in the source", 170 - # so "off" means "use system" 171 (lib.cmakeBool "YUZU_USE_EXTERNAL_SDL2" false) 172 - (lib.cmakeBool "YUZU_USE_EXTERNAL_VULKAN_HEADERS" true) 173 - "-DVulkan_INCLUDE_DIRS=${vulkan-headers}/include" 174 - 175 - # # don't use system ffmpeg, suyu uses internal APIs 176 - # (lib.cmakeBool "YUZU_USE_BUNDLED_FFMPEG" true) 177 178 # don't check for missing submodules 179 (lib.cmakeBool "YUZU_CHECK_SUBMODULES" false) ··· 186 # We dont want to bother upstream with potentially outdated compat reports 187 (lib.cmakeBool "YUZU_ENABLE_COMPATIBILITY_REPORTING" false) 188 (lib.cmakeBool "ENABLE_COMPATIBILITY_LIST_DOWNLOAD" false) # We provide this deterministically 189 ]; 190 191 env = { ··· 199 "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib" 200 ]; 201 202 - # Setting this through cmakeFlags does not work. 203 - # https://github.com/NixOS/nixpkgs/issues/114044 204 - preConfigure = lib.concatStringsSep "\n" [ 205 - '' 206 - cmakeFlagsArray+=( 207 - "-DTITLE_BAR_FORMAT_IDLE=${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) {}" 208 - "-DTITLE_BAR_FORMAT_RUNNING=${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) | {}" 209 - ) 210 - '' 211 # provide pre-downloaded tz data 212 - '' 213 - mkdir -p build/externals/nx_tzdb 214 - ln -s ${nx_tzdb} build/externals/nx_tzdb/nx_tzdb 215 - '' 216 - ]; 217 218 postConfigure = '' 219 ln -sf ${compat-list} ./dist/compatibility_list/compatibility_list.json ··· 228 homepage = "https://notabug.org/litucks/torzu"; 229 mainProgram = "yuzu"; 230 platforms = lib.platforms.linux; 231 - badPlatforms = [ 232 - # Several conversion errors, probably caused by the update to GCC 14 233 - "aarch64-linux" 234 - ]; 235 maintainers = with lib.maintainers; [ liberodark ]; 236 license = with lib.licenses; [ 237 gpl3Plus
··· 2 lib, 3 stdenv, 4 SDL2, 5 boost, 6 catch2_3, 7 cmake, ··· 17 glslang, 18 libopus, 19 libusb1, 20 lz4, 21 python3, 22 unzip, 23 nix-update-script, 24 nlohmann_json, 25 pkg-config, 26 qt6, 27 + spirv-tools, 28 + spirv-headers, 29 + vulkan-utility-libraries, 30 vulkan-headers, 31 vulkan-loader, 32 simpleini, 33 zlib, 34 vulkan-memory-allocator, ··· 98 ./fix-udp-protocol.patch 99 # Use specific boost::asio includes and update to modern io_context 100 ./fix-udp-client.patch 101 + # Updates suppressed diagnostics 102 + ./fix-aarch64-linux-build.patch 103 ]; 104 105 nativeBuildInputs = [ ··· 124 # intentionally omitted: dynarmic - prefer vendored version for compatibility 125 enet 126 127 ffmpeg-headless 128 fmt 129 # intentionally omitted: gamemode - loaded dynamically at runtime 130 # intentionally omitted: httplib - upstream requires an older version than what we have ··· 140 # intentionally omitted: renderdoc - heavy, developer only 141 SDL2 142 # intentionally omitted: stb - header only libraries, vendor uses git snapshot 143 + simpleini 144 + spirv-tools 145 + spirv-headers 146 vulkan-memory-allocator 147 + vulkan-utility-libraries 148 # intentionally omitted: xbyak - prefer vendored version for compatibility 149 zlib 150 zstd ··· 154 # making the build fail, as that path does not exist 155 dontFixCmake = true; 156 157 + __structuredAttrs = true; 158 cmakeFlags = [ 159 # actually has a noticeable performance impact 160 (lib.cmakeBool "YUZU_ENABLE_LTO" true) ··· 165 166 # use system libraries 167 # NB: "external" here means "from the externals/ directory in the source", 168 + # so "false" means "use system" 169 (lib.cmakeBool "YUZU_USE_EXTERNAL_SDL2" false) 170 + (lib.cmakeBool "YUZU_USE_EXTERNAL_VULKAN_HEADERS" false) 171 + (lib.cmakeBool "YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES" false) 172 + (lib.cmakeBool "YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS" false) 173 174 # don't check for missing submodules 175 (lib.cmakeBool "YUZU_CHECK_SUBMODULES" false) ··· 182 # We dont want to bother upstream with potentially outdated compat reports 183 (lib.cmakeBool "YUZU_ENABLE_COMPATIBILITY_REPORTING" false) 184 (lib.cmakeBool "ENABLE_COMPATIBILITY_LIST_DOWNLOAD" false) # We provide this deterministically 185 + 186 + (lib.cmakeFeature "TITLE_BAR_FORMAT_IDLE" "${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) {}") 187 + (lib.cmakeFeature "TITLE_BAR_FORMAT_RUNNING" "${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) | {}") 188 ]; 189 190 env = { ··· 198 "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib" 199 ]; 200 201 + preConfigure = '' 202 # provide pre-downloaded tz data 203 + mkdir -p build/externals/nx_tzdb 204 + ln -s ${nx_tzdb} build/externals/nx_tzdb/nx_tzdb 205 + ''; 206 207 postConfigure = '' 208 ln -sf ${compat-list} ./dist/compatibility_list/compatibility_list.json ··· 217 homepage = "https://notabug.org/litucks/torzu"; 218 mainProgram = "yuzu"; 219 platforms = lib.platforms.linux; 220 maintainers = with lib.maintainers; [ liberodark ]; 221 license = with lib.licenses; [ 222 gpl3Plus