From 20287ca12f5265ed2070f6fd50368bed745c3d21 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Fri, 21 Feb 2025 12:57:46 +0100 Subject: [PATCH] vesktop: properly replace text-input flags across nixpkgses --- overlay.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/overlay.nix b/overlay.nix index 1f43a8d..4d33dea 100644 --- a/overlay.nix +++ b/overlay.nix @@ -85,7 +85,11 @@ let }); vesktop = prev.vesktop.overrideAttrs (attrs: { - postFixup = builtins.replaceStrings [ "NIXOS_OZONE_WL" "--enable-wayland-ime=true" ] [ "WAYLAND_DISPLAY" "--enable-wayland-ime=true --wayland-text-input-version=3" ] attrs.postFixup; + postFixup = + let + flagToReplace = if final.lib.hasInfix "--enable-wayland-ime=true" attrs.postFixup then "--enable-wayland-ime=true" else "--enable-wayland-ime"; + in + builtins.replaceStrings [ "NIXOS_OZONE_WL" flagToReplace ] [ "WAYLAND_DISPLAY" "${flagToReplace} --wayland-text-input-version=3" ] attrs.postFixup; }); };