[PATCH] gnu: lxqt-config: Wrapping the lxqt-config and lxqt-config-input and setting the setxkbmap PATH for fixing save added layout

  • Open
  • quality assurance status badge
Details
2 participants
  • Hamzeh Nasajpour
  • Ludovic Courtès
Owner
unassigned
Submitted by
Hamzeh Nasajpour
Severity
normal
H
H
Hamzeh Nasajpour wrote on 5 Sep 2020 07:54
[PATCH] gnu: lxqt-config: Wrapping the lxqt-config and lxqt-co nfig-input and setting the setxkbmap PATH for fixing save add ed layout
(address . guix-patches@gnu.org)
2a9af2f5-62b9-45c9-bfa5-430241158521@www.fastmail.com
Toggle diff (30 lines)
diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
index 21587609ce..baa2ee6795 100644
--- a/gnu/packages/lxqt.scm
+++ b/gnu/packages/lxqt.scm
@@ -379,6 +379,7 @@ the operating system LXQt is running on.")
("qtbase" ,qtbase)
("qtsvg" ,qtsvg)
("qtx11extras" ,qtx11extras)
+ ("setxkbmap" ,setxkbmap)
("solid" ,solid)
("xf86-input-libinput" ,xf86-input-libinput)
("xkeyboard-config" ,xkeyboard-config)
@@ -418,7 +419,16 @@ the operating system LXQt is running on.")
(("\\$\\{LXQT_TRANSLATIONS_DIR\\}")
(string-append (assoc-ref outputs "out")
"/share/lxqt/translations")))
- #t)))))
+ #t))
+ (add-after 'install 'wrap-for-setxkbmap-path
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (setxkbmap (assoc-ref %build-inputs "setxkbmap")))
+ (wrap-program (string-append out "/bin/lxqt-config")
+ `("PATH" ":" prefix (,(string-append setxkbmap "/bin/"))))
+ (wrap-program (string-append out "/bin/lxqt-config-input")
+ `("PATH" ":" prefix (,(string-append setxkbmap "/bin/"))))
+ #t))))))
(home-page "https://lxqt.github.io")
(synopsis "Tools to configure LXQt and the underlying operating system")
(description "lxqt-config is providing several tools involved in the
H
H
Hamzeh Nasajpour wrote on 12 Sep 2020 14:01
Re: [PATCH] gnu: lxqt-config: Wrapping the lxqt-config and lxq t-config-input and setting the setxkbmap PATH for fixing save added layout
(address . guix-patches@gnu.org)
48a7703f-7edf-48e0-b8a9-8e03944d5e20@www.fastmail.com
Hi guys.
Seems that anyway we have to add `setxkbmap` to `propagated-inputs`. The previous commit will fix the adding `keyboard-layout` but without having the `setxkbmap` in `propagated-inputs` the added layouts won't add as permanent and will be reset after each reboot. So again, we need to add `setxkbmap` as a dependency in `propagated-inputs`.


On Sat, Sep 5, 2020, at 10:24 AM, Hamzeh Nasajpour wrote:
Toggle quote (37 lines)
> diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
> index 21587609ce..baa2ee6795 100644
> --- a/gnu/packages/lxqt.scm
> +++ b/gnu/packages/lxqt.scm
> @@ -379,6 +379,7 @@ the operating system LXQt is running on.")
> ("qtbase" ,qtbase)
> ("qtsvg" ,qtsvg)
> ("qtx11extras" ,qtx11extras)
> + ("setxkbmap" ,setxkbmap)
> ("solid" ,solid)
> ("xf86-input-libinput" ,xf86-input-libinput)
> ("xkeyboard-config" ,xkeyboard-config)
> @@ -418,7 +419,16 @@ the operating system LXQt is running on.")
> (("\\$\\{LXQT_TRANSLATIONS_DIR\\}")
> (string-append (assoc-ref outputs "out")
> "/share/lxqt/translations")))
> - #t)))))
> + #t))
> + (add-after 'install 'wrap-for-setxkbmap-path
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out"))
> + (setxkbmap (assoc-ref %build-inputs
> "setxkbmap")))
> + (wrap-program (string-append out
> "/bin/lxqt-config")
> + `("PATH" ":" prefix (,(string-append
> setxkbmap "/bin/"))))
> + (wrap-program (string-append out
> "/bin/lxqt-config-input")
> + `("PATH" ":" prefix (,(string-append
> setxkbmap "/bin/"))))
> + #t))))))
> (home-page "https://lxqt.github.io")
> (synopsis "Tools to configure LXQt and the underlying operating
> system")
> (description "lxqt-config is providing several tools involved in
> the
L
L
Ludovic Courtès wrote on 24 Sep 2020 17:22
Re: [bug#43210] [PATCH] gnu: lxqt-config: Wrapping the lxqt-config and lxqt-config-input and setting the setxkbmap PATH for fixing save added layout
(name . Hamzeh Nasajpour)(address . h.nasajpour@pantherx.org)(address . 43210@debbugs.gnu.org)
87pn6b6vxr.fsf@gnu.org
Hi,

"Hamzeh Nasajpour" <h.nasajpour@pantherx.org> skribis:

Toggle quote (2 lines)
> Seems that anyway we have to add `setxkbmap` to `propagated-inputs`. The previous commit will fix the adding `keyboard-layout` but without having the `setxkbmap` in `propagated-inputs` the added layouts won't add as permanent and will be reset after each reboot. So again, we need to add `setxkbmap` as a dependency in `propagated-inputs`.

Why is that? I fail to see why using ‘propagated-inputs’ instead of
wrapping would work better.

Toggle quote (15 lines)
>> + (add-after 'install 'wrap-for-setxkbmap-path
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (let ((out (assoc-ref outputs "out"))
>> + (setxkbmap (assoc-ref %build-inputs
>> "setxkbmap")))
>> + (wrap-program (string-append out
>> "/bin/lxqt-config")
>> + `("PATH" ":" prefix (,(string-append
>> setxkbmap "/bin/"))))
>> + (wrap-program (string-append out
>> "/bin/lxqt-config-input")
>> + `("PATH" ":" prefix (,(string-append
>> setxkbmap "/bin/"))))
>> + #t))))))

For this case, it might be easier/preferable to replace ‘setxkbmap’ in
the source code with the absolute file name of ‘setxkbmap’.

Thanks,
Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 43210@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 43210
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch