cosmic-greeter: add X11 xkb rules paths to wrapper

Set X11_BASE_RULES_XML and X11_BASE_EXTRA_RULES_XML environment variables
in the wrapper to fix xkeyboard_config path resolution. The xkb-data crate
used by cosmic-settings had hard-coded paths for the base.xml and extra.xml
files (/usr/share/X11/xkb/rules/), which are not compatible with NixOS.
This commit is contained in:
Heitor Augusto
2025-03-18 18:58:14 -03:00
parent b458df04ff
commit c9c3f370a2
@@ -10,6 +10,7 @@
linux-pam,
udev,
coreutils,
xkeyboard_config,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@@ -60,6 +61,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
substituteInPlace src/greeter.rs --replace-fail '/usr/bin/env' '${lib.getExe' coreutils "env"}'
'';
preFixup = ''
libcosmicAppWrapperArgs+=(
--set-default X11_BASE_RULES_XML ${xkeyboard_config}/share/X11/xkb/rules/base.xml
--set-default X11_BASE_EXTRA_RULES_XML ${xkeyboard_config}/share/X11/xkb/rules/extra.xml
)
'';
meta = {
homepage = "https://github.com/pop-os/cosmic-greeter";
description = "Greeter for the COSMIC Desktop Environment";