From d64d734643218e879a07999c0cac5447874143a5 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Mon, 6 Oct 2025 18:36:46 +0200 Subject: [PATCH 1/5] discord-rpc: fix build with CMake 4 Signed-off-by: Marcin Serwin --- pkgs/by-name/di/discord-rpc/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/di/discord-rpc/package.nix b/pkgs/by-name/di/discord-rpc/package.nix index d17df5b33080..97fe94cb559e 100644 --- a/pkgs/by-name/di/discord-rpc/package.nix +++ b/pkgs/by-name/di/discord-rpc/package.nix @@ -41,6 +41,12 @@ stdenv.mkDerivation rec { }) ]; + postPatch = '' + substituteInPlace CMakeLists.txt --replace-fail \ + "cmake_minimum_required (VERSION 3.2.0)" \ + "cmake_minimum_required (VERSION 3.10.0)" + ''; + meta = with lib; { description = "Official library to interface with the Discord client"; homepage = "https://github.com/discordapp/discord-rpc"; From e904194d8c115d6d1cdd6652c1f2bef58635d973 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Mon, 6 Oct 2025 18:48:12 +0200 Subject: [PATCH 2/5] mudlet: disable discord-rpc Signed-off-by: Marcin Serwin --- pkgs/games/mudlet/default.nix | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/games/mudlet/default.nix b/pkgs/games/mudlet/default.nix index 673d41d92da3..70beede3d01f 100644 --- a/pkgs/games/mudlet/default.nix +++ b/pkgs/games/mudlet/default.nix @@ -22,6 +22,7 @@ qtmultimedia, discord-rpc, yajl, + withDiscordRpc ? false, }: let @@ -98,8 +99,8 @@ stdenv.mkDerivation rec { qtbase qtmultimedia yajl - discord-rpc - ]; + ] + ++ lib.optional withDiscordRpc discord-rpc; cmakeFlags = [ # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/ @@ -131,10 +132,12 @@ stdenv.mkDerivation rec { --set LUA_CPATH "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \ --prefix LUA_PATH : "$NIX_LUA_PATH" \ --prefix DYLD_LIBRARY_PATH : "${ - lib.makeLibraryPath [ - libsForQt5.qtkeychain - discord-rpc - ] + lib.makeLibraryPath ( + [ + libsForQt5.qtkeychain + ] + ++ lib.optional withDiscordRpc discord-rpc + ) }:$out/lib" \ --chdir "$out"; @@ -146,10 +149,12 @@ stdenv.mkDerivation rec { --set LUA_CPATH "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \ --prefix LUA_PATH : "$NIX_LUA_PATH" \ --prefix LD_LIBRARY_PATH : "${ - lib.makeLibraryPath [ - libsForQt5.qtkeychain - discord-rpc - ] + lib.makeLibraryPath ( + [ + libsForQt5.qtkeychain + ] + ++ lib.optional withDiscordRpc discord-rpc + ) }" \ --chdir "$out"; From 12fd35f8220ca4cd6e8802eea5d929b1b6955151 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Mon, 6 Oct 2025 18:57:38 +0200 Subject: [PATCH 3/5] rmg: disable discord-rpc Signed-off-by: Marcin Serwin --- pkgs/by-name/rm/rmg/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/rm/rmg/package.nix b/pkgs/by-name/rm/rmg/package.nix index d1b4b79a0301..fe3fd28bae09 100644 --- a/pkgs/by-name/rm/rmg/package.nix +++ b/pkgs/by-name/rm/rmg/package.nix @@ -25,6 +25,7 @@ withWayland ? false, # Affects final license withAngrylionRdpPlus ? false, + withDiscordRpc ? false, }: stdenv.mkDerivation (finalAttrs: { @@ -48,7 +49,6 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ boost - discord-rpc freetype hidapi libpng @@ -62,6 +62,7 @@ stdenv.mkDerivation (finalAttrs: { xdg-user-dirs zlib ] + ++ lib.optional withDiscordRpc discord-rpc ++ ( with qt6Packages; [ @@ -78,6 +79,7 @@ stdenv.mkDerivation (finalAttrs: { # everything else. (lib.cmakeBool "NO_RUST" true) (lib.cmakeBool "USE_ANGRYLION" withAngrylionRdpPlus) + (lib.cmakeBool "DISCORD_RPC" withDiscordRpc) # Remove with 0.8.4 update ]; qtWrapperArgs = From 9721a81c361b721d9ab9f9d8ab2b323564353098 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Mon, 6 Oct 2025 19:01:58 +0200 Subject: [PATCH 4/5] openrct2: disable discord-rpc Signed-off-by: Marcin Serwin --- pkgs/by-name/op/openrct2/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/op/openrct2/package.nix b/pkgs/by-name/op/openrct2/package.nix index c81ed7d76675..c25a9e238739 100644 --- a/pkgs/by-name/op/openrct2/package.nix +++ b/pkgs/by-name/op/openrct2/package.nix @@ -30,6 +30,7 @@ pkg-config, speexdsp, zlib, + withDiscordRpc ? false, }: let @@ -79,7 +80,6 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ SDL2 curl - discord-rpc duktape expat flac @@ -100,13 +100,15 @@ stdenv.mkDerivation (finalAttrs: { openssl speexdsp zlib - ]; + ] + ++ lib.optional withDiscordRpc discord-rpc; cmakeFlags = [ (lib.cmakeBool "DOWNLOAD_OBJECTS" false) (lib.cmakeBool "DOWNLOAD_OPENMSX" false) (lib.cmakeBool "DOWNLOAD_OPENSFX" false) (lib.cmakeBool "DOWNLOAD_TITLE_SEQUENCES" false) + (lib.cmakeBool "DISABLE_DISCORD_RPC" (!withDiscordRpc)) ]; postUnpack = '' From 297f8fb901ffc15d1a1f425b4875c50247dcc5c5 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Mon, 6 Oct 2025 19:57:52 +0200 Subject: [PATCH 5/5] parallel-launcher: disable discord-rpc Signed-off-by: Marcin Serwin --- pkgs/by-name/pa/parallel-launcher/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pa/parallel-launcher/package.nix b/pkgs/by-name/pa/parallel-launcher/package.nix index babe4a9c08d5..9da8b75c3b34 100644 --- a/pkgs/by-name/pa/parallel-launcher/package.nix +++ b/pkgs/by-name/pa/parallel-launcher/package.nix @@ -20,6 +20,7 @@ # Allow overrides for the RetroArch core and declarative settings parallel-n64-core ? parallel-launcher.passthru.parallel-n64-core, extraRetroArchSettings ? { }, + withDiscordRpc ? false, }: let # Converts a version string like x.y.z to vx.y-z @@ -88,12 +89,12 @@ stdenv.mkDerivation ( buildInputs = [ SDL2 - discord-rpc libgcrypt sqlite qt5.qtbase qt5.qtsvg - ]; + ] + ++ lib.optional withDiscordRpc discord-rpc; qtWrapperArgs = [ "--prefix PATH : ${