audacity: use xwayland on wayland by default

Audacity doesn't support Wayland due to a memory leak.
This commit is contained in:
June Stepp 2025-02-13 14:44:41 -06:00
parent 64e75cd44a
commit acf8b759cd
No known key found for this signature in database
GPG Key ID: 348C6EB339AEC582

View File

@ -176,15 +176,17 @@ stdenv.mkDerivation (finalAttrs: {
dontWrapGApps = true; dontWrapGApps = true;
# Replace audacity's wrapper, to: # 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 # - Add the ffmpeg dynamic dependency
# - Use Xwayland by default on Wayland. See https://github.com/audacity/audacity/pull/5977
postFixup = postFixup =
lib.optionalString stdenv.hostPlatform.isLinux '' lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram "$out/bin/audacity" \ wrapProgram "$out/bin/audacity" \
"''${gappsWrapperArgs[@]}" \ "''${gappsWrapperArgs[@]}" \
--prefix LD_LIBRARY_PATH : "$out/lib/audacity":${lib.makeLibraryPath [ ffmpeg ]} \ --prefix LD_LIBRARY_PATH : "$out/lib/audacity":${lib.makeLibraryPath [ ffmpeg ]} \
--suffix AUDACITY_MODULES_PATH : "$out/lib/audacity/modules" \ --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 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin} mkdir -p $out/{Applications,bin}