Unverified Commit c9c3f370 authored by Heitor Augusto's avatar Heitor Augusto
Browse files

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.
parent b458df04
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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";