NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.38k stars 14.33k forks source link

Electron: Inconsistent addition of `--enable-wayland-ime` when `NIXOS_OZONE_WL` is set #358368

Closed 34j closed 2 days ago

34j commented 1 week ago

Describe the bug

I found that some packages add --enable-wayland-ime when NIXOS_OZONE_WL is set, and some do not.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Use Wayland and set NIXOS_OZONE_WL=1
  2. Install Fcitx5 and mozc
  3. Open vesktop and Slack

Expected behavior

All packages allow Japanese input

Screenshots

Additional context

Metadata

Notify maintainers

@mmahut @teutat3s @eadwu @Synthetica9 @bobby285271 @Enzime


Note for maintainers: Please tag this issue in your PR.


Add a :+1: reaction to issues you find important.

34j commented 1 week ago
import re

from collections import defaultdict
from pathlib import Path

result = defaultdict(list)

# for each nix file in the pkgs directory
for path in Path('pkgs').rglob('*.nix'):
    txt = path.read_text()

    # find NIXOS_OZONE_WL
    match = re.search(r'NIXOS_OZONE_WL.+?(--.+?)}', txt)

    # matched
    if match:
        group = match.group(1)
        package_name = path.parent.name
        result[group].append(package_name)

for k, v in result.items():
    print(k)
    print(f"    ({len(v)}) " + ", ".join(list(sorted(v))))
--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime
    (9) equibop, follow, gfn-electron, heroic, qq, siyuan, tetrio-desktop, vesktop, webcord
--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations
    (67) 1password-gui, affine, altair, anytype, bazecor, beekeeper-studio, beeper, bitwarden-desktop, bitwarden-directory-connector, blockbench, bruno, caprine, chatzone-desktop, chromium, cider, cider-2, code-cursor, deltachat-desktop, drawio, element, feishin, franz, geogebra, gitify, gitkraken, google-chrome, httptoolkit, itch, jitsi-meet-electron, kando, keybase, koodo-reader, kuro, legcord, lens, logseq, lunar-client, lx-music-desktop, mattermost-desktop, micropad, microsoft-edge, mqtt-explorer, muffon, nwjs, passky-desktop, plexamp, podman-desktop, proton-pass, protonmail-desktop, r2modman, redisinsight, ride, session-desktop, signal-desktop, teams-for-linux, tidal-hifi, uhk-agent, upscayl, vivaldi, vscode, wavebox, whalebird, wire-desktop, wootility, youtube-music, ytmdesktop, zettlr
--ozone-platform=wayland --enable-features=WaylandWindowDecorations
    (6) discord, framesh, joplin-desktop, multiviewer-for-f1, redact, revolt-desktop
--enable-features=UseOzonePlatform --ozone-platform=wayland
    (5) figma-linux, freetube, mullvad-vpn, postman, spotify
--ozone-platform-hint=auto
    (2) brave, zulip
--ozone-platform=wayland
    (2) github-desktop, obsidian
--ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer
    (1) goofcord
--ozone-platform=wayland --enable-features=WaylandWindowDecorations --enable-wayland-ime
    (1) ledger-live-desktop
--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer
    (2) morgen, slack