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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user