lol

enlightenment: add xkeyboard-config dependency (#40690)

- Add runtime dependence on xkeyboard-config

- Add base.lst from xkeyboard-config to the list of keyboard layout
files. Something similar to this has been removed in a previous patch
by mistake.

- Fix location of binary edge_cc. This has been removed in a previous
patch by mastake.

- Make the explanation for the wrapping of some binaries more clear.

authored by

José Romildo Malaquias and committed by
xeji
e8b8ba14 e80957d5

+35 -6
+35 -6
pkgs/desktops/enlightenment/enlightenment.nix
··· 35 35 gdbm 36 36 pcre 37 37 mesa_noglu 38 + xkeyboard_config 38 39 ] ++ 39 40 stdenv.lib.optionals stdenv.isLinux [ libcap ]; 40 41 41 - # Instead of setting owner to root and permissions to setuid/setgid 42 - # (which is not allowed for files in /nix/store) of some 43 - # enlightenment programs, the file $out/e-wrappers.nix is created, 44 - # containing the needed configuration for that purpose. It can be 45 - # used in the enlightenment module. 46 - patches = [ ./enlightenment.suid-exes.patch ]; 42 + patches = [ 43 + # Some programs installed by enlightenment (to set the cpu frequency, 44 + # for instance) need root ownership and setuid/setgid permissions, which 45 + # are not allowed for files in /nix/store. Instead of allowing the 46 + # installer to try to do this, the file $out/e-wrappers.nix is created, 47 + # containing the needed configuration for wrapping those programs. It 48 + # can be used in the enlightenment module. The idea is: 49 + # 50 + # 1) rename the original binary adding the extension .orig 51 + # 2) wrap the renamed binary at /run/wrappers/bin/ 52 + # 3) create a new symbolic link using the original binary name (in the 53 + # original directory where enlightenment wants it) pointing to the 54 + # wrapper 55 + 56 + ./enlightenment.suid-exes.patch 57 + ]; 58 + 59 + postPatch = '' 60 + # In order to get the available keyboard layouts Enlightenment looks for 61 + # the file xorg.lst, that should be provided by xkeyboard-config (when 62 + # configured with option --with-xkb-rules-symlink=xorg). Currently 63 + # xkeyboard-config is not configured with this option in 64 + # NixOS. Therefore it is needed to add base.lst (which xorg.lst would be 65 + # a symbolic link to) explicitly as an alternative. 66 + 67 + sed "/#ifdef XKB_BASE/a XKB_BASE \"\/rules\/base.lst\"," \ 68 + -i src/modules/wizard/page_011.c src/modules/xkbswitch/e_mod_parse.c 69 + 70 + # edge_cc is a binary provided by efl and cannot be found at the directory 71 + # given by e_prefix_bin_get(), which is $out/bin 72 + 73 + substituteInPlace src/bin/e_import_config_dialog.c \ 74 + --replace "e_prefix_bin_get()" "\"${efl}/bin\"" 75 + ''; 47 76 48 77 mesonFlags = [ "-Dsystemdunitdir=lib/systemd/user" ]; 49 78