Merge pull request #192659 from PaulGrandperrin/vscode-fix-wayland

electron apps: fix wayland window decorations
This commit is contained in:
maxine 2022-10-02 01:32:08 +02:00 committed by GitHub
commit c44d41af6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 14 additions and 14 deletions

View file

@ -109,7 +109,7 @@ let
gappsWrapperArgs+=(
# Add gio to PATH so that moving files to the trash works when not using a desktop environment
--prefix PATH : ${glib.bin}/bin
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
--add-flags ${lib.escapeShellArg commandLineArgs}
)
'';

View file

@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
makeWrapper ${electron}/bin/electron $out/bin/whalebird \
--add-flags $out/opt/Whalebird/resources/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
runHook postInstall
'';

View file

@ -177,7 +177,7 @@ stdenv.mkDerivation rec {
${optionalString (disableFeatures != []) ''
--add-flags "--disable-features=${strings.concatStringsSep "," disableFeatures}"
''}
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
${optionalString vulkanSupport ''
--prefix XDG_DATA_DIRS : "${addOpenGLRunpath.driverLink}/share"
--add-flags ${escapeShellArg commandLineArgs}

View file

@ -184,7 +184,7 @@ in stdenv.mkDerivation {
mkdir -p "$out/bin"
makeWrapper "${browserBinary}" "$out/bin/chromium" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--add-flags ${escapeShellArg commandLineArgs}
ed -v -s "$out/bin/chromium" << EOF

View file

@ -148,7 +148,7 @@ in stdenv.mkDerivation {
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:${addOpenGLRunpath.driverLink}/share" \
--set CHROME_WRAPPER "google-chrome-$dist" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--add-flags ${escapeShellArg commandLineArgs}
for elf in $out/share/google/$appname/{chrome,chrome-sandbox,${crashpadHandlerBinary},nacl_helper}; do

View file

@ -83,7 +83,7 @@ stdenv.mkDerivation rec {
wrapProgramShell $out/opt/${binaryName}/${binaryName} \
"''${gappsWrapperArgs[@]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${binaryName}

View file

@ -99,7 +99,7 @@ stdenv.mkDerivation rec {
makeWrapper '${electron}/bin/electron' "$out/bin/${executableName}" \
--set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher.so \
--add-flags "$out/share/element/electron" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
runHook postInstall
'';

View file

@ -160,7 +160,7 @@ stdenv.mkDerivation rec {
wrapProgram $executable \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--prefix LD_LIBRARY_PATH : ${rpath}:$out/opt/bytedance/feishu:${addOpenGLRunpath.driverLink}/share \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
${lib.optionalString (commandLineArgs!="") "--add-flags ${lib.escapeShellArg commandLineArgs}"}
done

View file

@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/resources/app.asar \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc xorg.libXtst pipewire ]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
'';
meta = with lib; {

View file

@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
# executable wrapper
makeWrapper '${electron}/bin/electron' "$out/bin/${executableName}" \
--add-flags "$out/share/element/electron" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
runHook postInstall
'';

View file

@ -50,7 +50,7 @@ stdenvNoCC.mkDerivation {
cp -r bin $out/bin
wrapProgram $out/bin/session-desktop \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
runHook postInstall
'';

View file

@ -108,7 +108,7 @@ stdenv.mkDerivation rec {
preFixup = ''
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ] }"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
)

View file

@ -170,7 +170,7 @@ let
makeWrapper $out/lib/slack/slack $out/bin/slack \
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
--suffix PATH : ${lib.makeBinPath [xdg-utils]} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
# Fix the desktop link
substituteInPlace $out/share/applications/slack.desktop \

View file

@ -62,7 +62,7 @@ in
# executable wrapper
makeWrapper '${electron}/bin/electron' "$out/bin/${executableName}" \
--add-flags "$out/share/micropad" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
runHook postInstall
'';