diff --git a/pkgs/by-name/to/torzu/fix-aarch64-linux-build.patch b/pkgs/by-name/to/torzu/fix-aarch64-linux-build.patch deleted file mode 100644 index 11d4a0a4ea2d..000000000000 --- a/pkgs/by-name/to/torzu/fix-aarch64-linux-build.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/video_core/host1x/vic.cpp b/src/video_core/host1x/vic.cpp -index 3ad56bb80..57e6adbf8 100644 ---- a/src/video_core/host1x/vic.cpp -+++ b/src/video_core/host1x/vic.cpp -@@ -13,7 +13,8 @@ - #endif - #elif defined(ARCHITECTURE_arm64) - #pragma GCC diagnostic push --#pragma GCC diagnostic ignored "-Wimplicit-int-conversion" -+#pragma GCC diagnostic ignored "-Wconversion" -+#pragma GCC diagnostic ignored "-Wshadow" - #include - #pragma GCC diagnostic pop - #endif diff --git a/pkgs/by-name/to/torzu/fix-debugger.patch b/pkgs/by-name/to/torzu/fix-debugger.patch deleted file mode 100644 index 87d4e0cc118f..000000000000 --- a/pkgs/by-name/to/torzu/fix-debugger.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/src/core/debugger/debugger.cpp b/src/core/debugger/debugger.cpp -index e86aae8460..a4dca23770 100644 ---- a/src/core/debugger/debugger.cpp -+++ b/src/core/debugger/debugger.cpp -@@ -5,7 +5,13 @@ - #include - #include - --#include -+// Use basic asio functionality only -+#define BOOST_ASIO_STANDALONE -+#include -+#include -+#include -+#include -+ - #include - - #include "common/logging/log.h" -@@ -21,17 +27,22 @@ - - template - static void AsyncReceiveInto(Readable& r, Buffer& buffer, Callback&& c) { -- static_assert(std::is_trivial_v); -- auto boost_buffer{boost::asio::buffer(&buffer, sizeof(Buffer))}; -- r.async_read_some( -- boost_buffer, [&, c](const boost::system::error_code& error, size_t bytes_read) { -- if (!error.failed()) { -- const u8* buffer_start = reinterpret_cast(&buffer); -- std::span received_data{buffer_start, buffer_start + bytes_read}; -- c(received_data); -- AsyncReceiveInto(r, buffer, c); -- } -- }); -+ try { -+ static_assert(std::is_trivial_v); -+ auto boost_buffer{boost::asio::buffer(&buffer, sizeof(Buffer))}; -+ r.async_read_some( -+ boost_buffer, -+ [&, c](const boost::system::error_code& error, size_t bytes_read) { -+ if (!error) { -+ const u8* buffer_start = reinterpret_cast(&buffer); -+ std::span received_data{buffer_start, buffer_start + bytes_read}; -+ c(received_data); -+ AsyncReceiveInto(r, buffer, c); -+ } -+ }); -+ } catch (const std::exception& e) { -+ LOG_ERROR(Debug_GDBStub, "AsyncReceiveInto error: {}", e.what()); -+ } - } - - template diff --git a/pkgs/by-name/to/torzu/fix-udp-client.patch b/pkgs/by-name/to/torzu/fix-udp-client.patch deleted file mode 100644 index 103b1001ee2a..000000000000 --- a/pkgs/by-name/to/torzu/fix-udp-client.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp -index 60821b31a6..8f9c047218 100644 ---- a/src/input_common/drivers/udp_client.cpp -+++ b/src/input_common/drivers/udp_client.cpp -@@ -2,7 +2,15 @@ - // SPDX-License-Identifier: GPL-2.0-or-later - - #include --#include -+// Include only needed asio components -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - #include - - #include "common/logging/log.h" -@@ -113,7 +121,7 @@ private: - } - - SocketCallback callback; -- boost::asio::io_service io_service; -+ boost::asio::io_context io_service; - boost::asio::basic_waitable_timer timer; - udp::socket socket; - diff --git a/pkgs/by-name/to/torzu/fix-udp-protocol.patch b/pkgs/by-name/to/torzu/fix-udp-protocol.patch deleted file mode 100644 index 65c4862825fc..000000000000 --- a/pkgs/by-name/to/torzu/fix-udp-protocol.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/input_common/helpers/udp_protocol.h b/src/input_common/helpers/udp_protocol.h -index db08fc62c5..ea223ea937 100644 ---- a/src/input_common/helpers/udp_protocol.h -+++ b/src/input_common/helpers/udp_protocol.h -@@ -69,7 +69,7 @@ Message CreateMessage(const u32 magic, const T data, const u32 sender_id) { - }; - Message message{header, data}; - crc.process_bytes(&message, sizeof(Message)); -- message.header.crc = crc.checksum(); -+ message.header.crc = static_cast(crc.checksum()); - return message; - } - diff --git a/pkgs/by-name/to/torzu/package.nix b/pkgs/by-name/to/torzu/package.nix deleted file mode 100644 index 8545b55189fe..000000000000 --- a/pkgs/by-name/to/torzu/package.nix +++ /dev/null @@ -1,229 +0,0 @@ -{ - lib, - stdenv, - SDL2, - boost, - catch2_3, - cmake, - fetchFromGitHub, - cpp-jwt, - cubeb, - discord-rpc, - enet, - fetchgit, - fetchurl, - ffmpeg-headless, - fmt, - glslang, - libopus, - libusb1, - lz4, - python3, - unzip, - nix-update-script, - nlohmann_json, - pkg-config, - qt6, - spirv-tools, - spirv-headers, - vulkan-utility-libraries, - vulkan-headers, - vulkan-loader, - simpleini, - zlib, - vulkan-memory-allocator, - zstd, -}: - -let - inherit (qt6) - qtbase - qtmultimedia - qtwayland - wrapQtAppsHook - qttools - qtwebengine - ; - - compat-list = stdenv.mkDerivation { - pname = "yuzu-compatibility-list"; - version = "unstable-2024-02-26"; - - src = fetchFromGitHub { - owner = "flathub"; - repo = "org.yuzu_emu.yuzu"; - rev = "9c2032a3c7e64772a8112b77ed8b660242172068"; - hash = "sha256-ITh/W4vfC9w9t+TJnPeTZwWifnhTNKX54JSSdpgaoBk="; - }; - - buildCommand = '' - cp $src/compatibility_list.json $out - ''; - }; - - nx_tzdb = stdenv.mkDerivation rec { - pname = "nx_tzdb"; - version = "221202"; - - src = fetchurl { - url = "https://github.com/lat9nq/tzdb_to_nx/releases/download/${version}/${version}.zip"; - hash = "sha256-mRzW+iIwrU1zsxHmf+0RArU8BShAoEMvCz+McXFFK3c="; - }; - - nativeBuildInputs = [ unzip ]; - - buildCommand = '' - unzip $src -d $out - ''; - - }; - -in - -stdenv.mkDerivation (finalAttrs: { - pname = "torzu"; - version = "unstable-2025-02-22"; - - src = fetchgit { - url = "https://git.ynh.ovh/liberodark/torzu.git"; - rev = "eaa9c9e3a46eb5099193b11d620ddfe96b6aec83"; - hash = "sha256-KxLRXM8Y+sIW5L9oYMSeK95HRb30zGRRSfil9DO+utU="; - fetchSubmodules = true; - }; - - patches = [ - # Remove coroutines from debugger to fix boost::asio compatibility issues - ./fix-debugger.patch - # Add explicit cast for CRC checksum value - ./fix-udp-protocol.patch - # Use specific boost::asio includes and update to modern io_context - ./fix-udp-client.patch - # Updates suppressed diagnostics - ./fix-aarch64-linux-build.patch - ]; - - nativeBuildInputs = [ - cmake - glslang - pkg-config - python3 - qttools - wrapQtAppsHook - ]; - - buildInputs = [ - # vulkan-headers must come first, so the older propagated versions - # don't get picked up by accident - vulkan-headers - - boost - catch2_3 - cpp-jwt - cubeb - discord-rpc - # intentionally omitted: dynarmic - prefer vendored version for compatibility - enet - - ffmpeg-headless - fmt - # intentionally omitted: gamemode - loaded dynamically at runtime - # intentionally omitted: httplib - upstream requires an older version than what we have - libopus - libusb1 - # intentionally omitted: LLVM - heavy, only used for stack traces in the debugger - lz4 - nlohmann_json - qtbase - qtmultimedia - qtwayland - qtwebengine - # intentionally omitted: renderdoc - heavy, developer only - SDL2 - # intentionally omitted: stb - header only libraries, vendor uses git snapshot - simpleini - spirv-tools - spirv-headers - vulkan-memory-allocator - vulkan-utility-libraries - # intentionally omitted: xbyak - prefer vendored version for compatibility - zlib - zstd - ]; - - # This changes `ir/opt` to `ir/var/empty` in `externals/dynarmic/src/dynarmic/CMakeLists.txt` - # making the build fail, as that path does not exist - dontFixCmake = true; - - __structuredAttrs = true; - cmakeFlags = [ - # actually has a noticeable performance impact - (lib.cmakeBool "YUZU_ENABLE_LTO" true) - (lib.cmakeBool "YUZU_TESTS" false) - - (lib.cmakeBool "ENABLE_QT6" true) - (lib.cmakeBool "ENABLE_QT_TRANSLATION" true) - - # use system libraries - # NB: "external" here means "from the externals/ directory in the source", - # so "false" means "use system" - (lib.cmakeBool "YUZU_USE_EXTERNAL_SDL2" false) - (lib.cmakeBool "YUZU_USE_EXTERNAL_VULKAN_HEADERS" false) - (lib.cmakeBool "YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES" false) - (lib.cmakeBool "YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS" false) - - # don't check for missing submodules - (lib.cmakeBool "YUZU_CHECK_SUBMODULES" false) - - # enable some optional features - (lib.cmakeBool "YUZU_USE_QT_WEB_ENGINE" true) - (lib.cmakeBool "YUZU_USE_QT_MULTIMEDIA" true) - (lib.cmakeBool "USE_DISCORD_PRESENCE" true) - - # We dont want to bother upstream with potentially outdated compat reports - (lib.cmakeBool "YUZU_ENABLE_COMPATIBILITY_REPORTING" false) - (lib.cmakeBool "ENABLE_COMPATIBILITY_LIST_DOWNLOAD" false) # We provide this deterministically - - (lib.cmakeFeature "TITLE_BAR_FORMAT_IDLE" "${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) {}") - (lib.cmakeFeature "TITLE_BAR_FORMAT_RUNNING" "${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) | {}") - ]; - - env = { - # Does some handrolled SIMD - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isx86_64 "-msse4.1"; - }; - - qtWrapperArgs = [ - # Fixes vulkan detection. - # FIXME: patchelf --add-rpath corrupts the binary for some reason, investigate - "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib" - ]; - - preConfigure = '' - # provide pre-downloaded tz data - mkdir -p build/externals/nx_tzdb - ln -s ${nx_tzdb} build/externals/nx_tzdb/nx_tzdb - ''; - - postConfigure = '' - ln -sf ${compat-list} ./dist/compatibility_list/compatibility_list.json - ''; - - postInstall = " - install -Dm444 $src/dist/72-yuzu-input.rules $out/lib/udev/rules.d/72-yuzu-input.rules - "; - - meta = { - description = "Fork of yuzu, an open-source Nintendo Switch emulator"; - homepage = "https://notabug.org/litucks/torzu"; - mainProgram = "yuzu"; - platforms = lib.platforms.linux; - maintainers = with lib.maintainers; [ liberodark ]; - license = with lib.licenses; [ - gpl3Plus - # Icons - asl20 - mit - cc0 - ]; - }; -}) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6f6dbc1d17dd..2585ff7a23e5 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1827,6 +1827,7 @@ mapAliases { tor-browser-bundle-bin = tor-browser; # Added 2023-09-23 torrenttools = throw "torrenttools has been removed due to lack of maintanance upstream"; # Added 2025-04-06 torq = throw "torq has been removed because the project went closed source"; # Added 2024-11-24 + torzu = throw "torzu has been removed from nixpkgs, as it is subject to a DMCA takedown"; # Added 2025-05-12 transmission = lib.warnOnInstantiate (transmission3Warning { }) transmission_3; # Added 2024-06-10 transmission-gtk = lib.warnOnInstantiate (transmission3Warning { suffix = "-gtk";