From acf8b759cdfdd71fc29239ec8a410eba96bab1b1 Mon Sep 17 00:00:00 2001 From: June Stepp Date: Thu, 13 Feb 2025 14:44:41 -0600 Subject: [PATCH] audacity: use xwayland on wayland by default Audacity doesn't support Wayland due to a memory leak. --- pkgs/by-name/au/audacity/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/au/audacity/package.nix b/pkgs/by-name/au/audacity/package.nix index 061aea770cda..8c99fb7705bf 100644 --- a/pkgs/by-name/au/audacity/package.nix +++ b/pkgs/by-name/au/audacity/package.nix @@ -176,15 +176,17 @@ stdenv.mkDerivation (finalAttrs: { dontWrapGApps = true; # Replace audacity's wrapper, to: - # - put it in the right place, it shouldn't be in "$out/audacity" + # - Put it in the right place; it shouldn't be in "$out/audacity" # - Add the ffmpeg dynamic dependency + # - Use Xwayland by default on Wayland. See https://github.com/audacity/audacity/pull/5977 postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram "$out/bin/audacity" \ "''${gappsWrapperArgs[@]}" \ --prefix LD_LIBRARY_PATH : "$out/lib/audacity":${lib.makeLibraryPath [ ffmpeg ]} \ --suffix AUDACITY_MODULES_PATH : "$out/lib/audacity/modules" \ - --suffix AUDACITY_PATH : "$out/share/audacity" + --suffix AUDACITY_PATH : "$out/share/audacity" \ + --set-default GDK_BACKEND x11 '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/{Applications,bin}