[PATCH] gnu: Add kbdd.

  • Done
  • quality assurance status badge
Details
3 participants
  • Boris A. Dekshteyn
  • Boris A. Dekshteyn
  • Jakub K?dzio?ka
Owner
unassigned
Submitted by
Boris A. Dekshteyn
Severity
normal
B
B
Boris A. Dekshteyn wrote on 24 Apr 2020 09:20
(address . guix-patches@gnu.org)(name . Boris A. Dekshteyn)(address . boris.dekshteyn@google.com)
20200424072023.32416-1-boris.dekshteyn@google.com
---
gnu/packages/xdisorg.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index bc2c9c4622..d1bc415a71 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2286,3 +2286,41 @@ to find all available clips and launches @command{dmenu} (or @command{rofi},
depending on the value of @code{CM_LAUNCHER}) to let the user select a clip.
After selection, the clip is put onto the PRIMARY and CLIPBOARD X selections.")
(license license:public-domain))))
+
+(define-public kbdd
+ (package
+ (name "kbdd")
+ (version "0.7.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/qnikst/kbdd/archive/v"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0nhn7cx1z4k1kfll325xjr5a31zjc4h5h8q0wxa9svz8aihfxcqp"))
+ (file-name (string-append "kbdd" version))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'configure-fix
+ (lambda* _
+ (invoke "aclocal")
+ (invoke "automake" "--add-missing")
+ (invoke "autoreconf"))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("glib" ,glib "bin")))
+ (inputs
+ `(("glib" ,glib)
+ ("dbus-glib", dbus-glib)
+ ("libx11" ,libx11)))
+ (home-page "https://github.com/qnikst/kbdd")
+ (synopsis "Simple daemon and library to make per window layout using XKB")
+ (description "Kbdd is a simple keyboard layout manager.
++ Features: WM / DE independant, Written in plain C (only glib dependant),
++ has optional dbus interface")
+ (license license:bsd-2)))
--
2.26.1
J
J
Jakub K?dzio?ka wrote on 27 Apr 2020 23:50
(name . Boris A. Dekshteyn)(address . harlequin78@gmail.com)
20200427215017.qlrz5yi77cgsn26n@gravity
On Fri, Apr 24, 2020 at 07:20:23PM +1200, Boris A. Dekshteyn wrote:
Toggle quote (4 lines)
> ---
> gnu/packages/xdisorg.scm | 38 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)

In your future patches, please include a ChangeLog-style line in the
body of the commit message. You can look at the commit history for some
examples. In the case of new packages, it's customary to write

* gnu/packages/xdisorg.scm (kbdd): New variable.

Toggle quote (14 lines)
> +(define-public kbdd
> + (package
> + (name "kbdd")
> + (version "0.7.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/qnikst/kbdd/archive/v"
> + version ".tar.gz"))
> + (sha256
> + (base32 "0nhn7cx1z4k1kfll325xjr5a31zjc4h5h8q0wxa9svz8aihfxcqp"))
> + (file-name (string-append "kbdd" version))))

It's generally a bad idea to use GitHub's autogenerated tarball, since
it is occasionally regenerated, which changes the hash. See point 13 of
"(guix)Submitting Patches". This is also pointed out by `guix lint`,
please make sure to run it on your packages.

Toggle quote (10 lines)
> + (build-system gnu-build-system)
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (add-before 'configure 'configure-fix
> + (lambda* _
> + (invoke "aclocal")
> + (invoke "automake" "--add-missing")
> + (invoke "autoreconf"))))))

I got surprised that this phase is necessary, as gnu-build-system
already includes the 'bootstrap phase. I tried removing it and the
package still builds. Was that not the case for you?

Toggle quote (10 lines)
> + (native-inputs
> + `(("pkg-config" ,pkg-config)
> + ("autoconf" ,autoconf)
> + ("automake" ,automake)
> + ("glib" ,glib "bin")))
> + (inputs
> + `(("glib" ,glib)
> + ("dbus-glib", dbus-glib)
> + ("libx11" ,libx11)))

Usually, alphabetical order is preferred unless there's a reason to
deviate.

Toggle quote (4 lines)
> + (description "Kbdd is a simple keyboard layout manager.
> ++ Features: WM / DE independant, Written in plain C (only glib dependant),
> ++ has optional dbus interface")

The leading pluses almost certainly shouldn't be there. The description
is written somewhat oddly. When you're out of inspiration for a
description, you can adapt Debian's. In fact, the description used by
Debian made it much more clear to me why I'd want to use the package:

(synopsis "Per-window keyboard layout switching daemon for X")
(description "@command{kbdd} is a simple keyboard layout switching
program, which is designed to run in an X11 session and remember
keyboard layouts on a per-window basis. That can be very handy for a
user of a non-US keyboard who does not want to jump through layouts back
and forth while typing in terminals (mostly in a latin alphabet) and
some kind of chat (in native language).

@command{kbdd} also supports D-Bus signals, which makes it possible to
create layout indicator widgets.")

Thanks for your contributions! Would you mind sending an updated patch?
(To the same bug number, 40810@debbugs.gnu.org. Also, please CC me, as I
don't subscribe to the guix-patches mailing list.)

Regards,
Jakub K?dzio?ka
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl6nU5QACgkQ4xWnWEYT
FWTTNBAAmA58ejJuIZtjdhDsDGDtcCzrpaH3VHDaU4ea/E7KXM67iMW+Hj6UQ6fD
NNGpzAfobUvF+iUlcU81xkT2s9Zd7RUSXu6zn6+oiZkaLDTi96iF/FL1C9VuSsCc
k/9tiCVFXfTNHL5edTXFlXP2YqyTCb5Fn3bKR8oD2ly+qGcALOEcq5wrUrmV8zv6
AhdvLBHCLVynEWFp90zIbjRE3BdGtwgQvtTVPx2elDwS9h0LsH+R72l1Pb/p0bf+
lmq0LBYpEefuW9jdHvlXMiAScMHj6yPEu+z100sn6f88rWVU7+KjIk0YtsaNSPcZ
mllLLZqNwWDFNpWSk6YT+9e0CK4lL6xpX3EBMY9VZ2mM34hWeZ1muxCUTUuYmBX0
W7QGwNKIVcOlgMhlYLFl2PrFZvoMv72mSDSYS7+TsyaGI47P/CPGXo42lQEiztdw
1RMlMyz3iAbrMHn5LimjbhEYPJeDm+GtMHipXWisSFGk9bPpPnCu1VtdLpagAiCm
NO+vSxcCBmF064pSo1I6NxWTkEoJ+NNEFR0U0Rg1UsWrASAJHMW2BEb7eJk+WcPT
HiZ2A7OOwpIzJqTvCrkwjZwqcrPdQQA4RD5kAIF86ftIRg2UA35y8Cm0eFXIBAkJ
JNT/wT+dyE2irXSehEGsT9Ij7qc/+qehqrKtcov38SUYNJzj9kA=
=FjU/
-----END PGP SIGNATURE-----


B
B
Boris A. Dekshteyn wrote on 28 Apr 2020 04:09
[PATCH] gnu: Add kbdd-0.7.1
(address . 40810@debbugs.gnu.org)(name . Boris A. Dekshteyn)(address . boris.dekshteyn@gmail.com)
20200428020919.2637-1-boris.dekshteyn@gmail.com
* gnu/packages/xdisorg.scm (kbdd): New variable.
---
gnu/packages/xdisorg.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index bc2c9c4622..9edd46e889 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2286,3 +2286,40 @@ to find all available clips and launches @command{dmenu} (or @command{rofi},
depending on the value of @code{CM_LAUNCHER}) to let the user select a clip.
After selection, the clip is put onto the PRIMARY and CLIPBOARD X selections.")
(license license:public-domain))))
+
+(define-public kbdd
+ (package
+ (name "kbdd")
+ (version "0.7.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/qnikst/kbdd.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0qkq75grbd4wkx4nlvswgavpijk9ad0pzqyj89a0ayjsbsn36pqy"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("glib" ,glib "bin")
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("dbus-glib", dbus-glib)
+ ("glib" ,glib)
+ ("libx11" ,libx11)))
+ (home-page "https://github.com/qnikst/kbdd")
+ (synopsis "Per-window keyboard layout switching daemon for X")
+ (description "@command{kbdd} is a simple keyboard layout switching
+program, which is designed to run in an X11 session and remember
+keyboard layouts on a per-window basis. That can be very handy for a
+user of a non-US keyboard who does not want to jump through layouts back
+and forth while typing in terminals (mostly in a latin alphabet) and
+some kind of chat (in native language).
+
+@command{kbdd} also supports D-Bus signals, which makes it possible to
+create layout indicator widgets.")
+ (license license:bsd-2)))
--
2.26.2
J
J
Jakub K?dzio?ka wrote on 28 Apr 2020 12:05
(name . Boris A. Dekshteyn)(address . boris.dekshteyn@gmail.com)(address . 40810-done@debbugs.gnu.org)
20200428100504.tqmue4srwcntxisq@gravity
On Tue, Apr 28, 2020 at 02:09:19PM +1200, Boris A. Dekshteyn wrote:
Toggle quote (5 lines)
> * gnu/packages/xdisorg.scm (kbdd): New variable.
> ---
> gnu/packages/xdisorg.scm | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)

Thanks, I pushed your patch as commit 83812f34d7a01bb404d8dda17bd4c72bf30b8371.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl6n/9AACgkQ4xWnWEYT
FWRBSRAApFlPeYI/zYGIYvjSJsBb9z8WQWXeVG/fUcsX28dZmPuDPPpSQCEl/2M8
aD9kzvmB6meYhiI01GfJG6+QnZajt+ellJqxATojZmdITnmW6eqO1setbOikRMrV
zXl+5vJYTE0DDqZHq9Obl1LeCyxN62N8lsFvgBm5lzM4eGM5BSlHJxLB3bjtUvCR
rX8pOzaGAFiCOsyuxVMlXxxBYc4kZB2Ra0BdbLidmpE0O+7jnx+FSvv82BsEDs5D
1eK9dA9GKIKqcSH68kp6mWZkacrUTrAK5TrtNzHdu34wPaYdeNtWRFGiBnpMPkQx
7+nMqHTQFm+xRg2UmdmboYDZpNSqiMnNtnVJ/QBydKpuHnRbrq/Flx9vxkupFM7Q
hORn6zIkRYqDsEYTcivJF2pEGNyiWGAyBBr3Zuqwe00lb/NcOZ7319ZFCbDvVu45
xDNjODYapd0CEdZgdSSjQFqTU4r4dAeDSyHdBTodDxURQLuQQN5H+TPw4sLR0lkR
qcHMbpvzc7YNjo9NypHByO1b89CfxO8+LalWtkWXTC+vZ5qp68fDZOUG+M4qlYcL
v3QaNeq0kCJV6kqCam2/MvfE5x4kCd/dBkIVFOnrTSI6SlE+JlzTwfoy3+7igcCz
CIFqBv0fryk+b857ceJM1vcdqZbFUeBs4lu619954kiGW64544Y=
=RZYo
-----END PGP SIGNATURE-----


Closed
?