From 045fecff99630ec381f8c271356aa04ac622c64e Mon Sep 17 00:00:00 2001 From: DeimElias Date: Tue, 9 Dec 2025 00:24:53 -0600 Subject: [PATCH] freerdp: wrap SDL2 client to use native wayland Since X11 is the default https://wiki.libsdl.org/SDL2/FAQUsingSDL --- pkgs/by-name/fr/freerdp/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/fr/freerdp/package.nix b/pkgs/by-name/fr/freerdp/package.nix index abd837005833..ed58757fa33f 100644 --- a/pkgs/by-name/fr/freerdp/package.nix +++ b/pkgs/by-name/fr/freerdp/package.nix @@ -58,6 +58,7 @@ withUnfree ? false, withWaylandSupport ? false, withSDL2 ? false, + makeWrapper, # tries to compile and run generate_argument_docbook.c withManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, @@ -104,6 +105,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config wayland-scanner writableTmpDirAsHomeHook + makeWrapper ]; buildInputs = [ @@ -206,6 +208,11 @@ stdenv.mkDerivation (finalAttrs: { ] ); + postFixup = lib.optionalString (withWaylandSupport && withSDL2) '' + wrapProgram $out/bin/sdl2-freerdp \ + --set SDL_VIDEODRIVER wayland + ''; + passthru.tests = { inherit remmina; inherit gnome-remote-desktop;