GNU bug report logs - #66193
[PATCH] gnu: Add keyd.

Previous Next

Package: guix-patches;

Reported by: "ShinyZero0" <shinyzero0 <at> tilde.club>

Date: Mon, 25 Sep 2023 16:46:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66193 in the body.
You can then email your comments to 66193 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66193; Package guix-patches. (Mon, 25 Sep 2023 16:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "ShinyZero0" <shinyzero0 <at> tilde.club>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 25 Sep 2023 16:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "ShinyZero0" <shinyzero0 <at> tilde.club>
To: <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: Add keyd.
Date: Mon, 25 Sep 2023 19:45:13 +0300
From 01e89ff48c77e12b7a8f206098901e08bc979935 Mon Sep 17 00:00:00 2001
From: "zero <at> fedora" <shinyzero0 <at> tilde.club>
Date: Mon, 25 Sep 2023 19:39:00 +0300
Subject: [PATCH] gnu: Add keyd

* gnu/packages/keyd.scm: New file.
---
 gnu/packages/keyd.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 gnu/packages/keyd.scm

diff --git a/gnu/packages/keyd.scm b/gnu/packages/keyd.scm
new file mode 100644
index 0000000000..48afd9f877
--- /dev/null
+++ b/gnu/packages/keyd.scm
@@ -0,0 +1,43 @@
+(define-module (gnu packages keyd))
+(use-modules
+  (guix packages)
+  (gnu packages linux)
+  (guix git-download)
+  ((guix licenses) #:prefix license:)
+  (guix build-system gnu))
+(define-public keyd
+  (package
+    (name "keyd")
+    (version "2.4.3")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/rvaiya/keyd")
+               (commit (string-append "v" version))))
+        (sha256
+          (base32
+            "1awdp863amq95y990fi4wj389ssv3ip2daqz2ph23lsahwa6f5in"))))
+    (arguments
+      (list #:tests? ; no tests
+            #f
+            #:make-flags
+            '(list "CC=gcc"
+                   "PREFIX="
+                   (string-append
+                     "DESTDIR="
+                     (assoc-ref %outputs "out")))
+            #:phases
+            '(modify-phases
+               %standard-phases
+               (delete 'configure)))) ; no autoconf
+    (build-system gnu-build-system)
+    (inputs (list linux-libre-headers))
+    (synopsis "A key remapping daemon for linux.")
+    (description
+      "Keyd is a keyboard remapping utility with intuitive ini
+      config file format. Keyd has several unique features, many of
+      which are traditionally only found in custom keyboard firmware
+      like QMK")
+    (home-page "https://github.com/rvaiya/keyd")
+    (license license:expat)))
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#66193; Package guix-patches. (Mon, 25 Sep 2023 19:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 66193 <at> debbugs.gnu.org (full text, mbox):

From: Jack Hill <jackhill <at> jackhill.us>
To: ShinyZero0 <shinyzero0 <at> tilde.club>
Cc: 66193 <at> debbugs.gnu.org
Subject: Re: [bug#66193] [PATCH] gnu: Add keyd.
Date: Mon, 25 Sep 2023 14:59:53 -0400 (EDT)
On Mon, 25 Sep 2023, ShinyZero0 wrote:

> From 01e89ff48c77e12b7a8f206098901e08bc979935 Mon Sep 17 00:00:00 2001
> From: "zero <at> fedora" <shinyzero0 <at> tilde.club>
> Date: Mon, 25 Sep 2023 19:39:00 +0300
> Subject: [PATCH] gnu: Add keyd
>
> * gnu/packages/keyd.scm: New file.

Thanks for your submission. keyd looks like a neat package that I did not 
know about before!

I'll leave some comments below about some things that I think can be 
improved. Can you look into them and send a second version?

> ---
> gnu/packages/keyd.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
> create mode 100644 gnu/packages/keyd.scm

When adding a new file, it should also be added to the list of files in 
gnu/local.mk. Also, the "This file is party of GNU Guix" header should be 
added to the beginning of this file (it can be copied from another one). 
You can also add a copyright line for yourself!

Alternatively, you could put keyd in an existing file. linux.scm might be 
a good one. This is a little bit of a judgment call, and I'm not 
experienced enough to know what's best. Maybe someone else will chime in 
here, or you could ask for advice on IRC.

> diff --git a/gnu/packages/keyd.scm b/gnu/packages/keyd.scm
> new file mode 100644
> index 0000000000..48afd9f877
> --- /dev/null
> +++ b/gnu/packages/keyd.scm
> @@ -0,0 +1,43 @@
> +(define-module (gnu packages keyd))
> +(use-modules
> +  (guix packages)
> +  (gnu packages linux)
> +  (guix git-download)
> +  ((guix licenses) #:prefix license:)
> +  (guix build-system gnu))
> +(define-public keyd
> +  (package
> +    (name "keyd")
> +    (version "2.4.3")
> +    (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +               (url "https://github.com/rvaiya/keyd")
> +               (commit (string-append "v" version))))
> +        (sha256
> +          (base32
> +            "1awdp863amq95y990fi4wj389ssv3ip2daqz2ph23lsahwa6f5in"))))
> +    (arguments
> +      (list #:tests? ; no tests
> +            #f

I looks to me like there are tests in the t directory. Can they be 
enabled?

https://github.com/rvaiya/keyd/blob/5e4ef41b41ce02f7d6a9f2e51298810d84589e76/Makefile#L87-L91

Also, a little bit of a nitpick, but I think it would be easier to read if 
#tests? and #f were on the same line.

> +            #:make-flags
> +            '(list "CC=gcc"

Unfortunately, there's a subtle bug here. Most of the time this will work, 
but when cross compiling, it will pick the wrong GCC (oops!). Fortunately 
we have a cc-for-target procedure that will pick the right one. Here's an 
example of it in use:

https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/linux.scm?id=fafd3caef0d51811a5da81d6061789e2908b0dac#n1591

> +                   "PREFIX="
> +                   (string-append
> +                     "DESTDIR="
> +                     (assoc-ref %outputs "out")))

This can probably be upgraded to the new style of using gexps to find the 
output. The above example package does that. See also this blog post for 
the long explanation:

https://guix.gnu.org/en/blog/2021/the-big-change/

> +            #:phases
> +            '(modify-phases
> +               %standard-phases
> +               (delete 'configure)))) ; no autoconf
> +    (build-system gnu-build-system)
> +    (inputs (list linux-libre-headers))
> +    (synopsis "A key remapping daemon for linux.")
> +    (description
> +      "Keyd is a keyboard remapping utility with intuitive ini
> +      config file format. Keyd has several unique features, many of
> +      which are traditionally only found in custom keyboard firmware
> +      like QMK")

Another nitpick: intuitive and unique sound like marketing words to me and 
can probably be left out. However that's just my taste.

> +    (home-page "https://github.com/rvaiya/keyd")
> +    (license license:expat)))

That's all I have for know. Thanks again for your contribution, and 
hopefully you found this review helpful.

All the best,
Jack




Information forwarded to guix-patches <at> gnu.org:
bug#66193; Package guix-patches. (Tue, 26 Sep 2023 14:23:01 GMT) Full text and rfc822 format available.

Message #11 received at 66193 <at> debbugs.gnu.org (full text, mbox):

From: "ShinyZero0" <shinyzero0 <at> tilde.club>
To: <66193 <at> debbugs.gnu.org>
Subject: [PATCH] gnu: Add keyd
Date: Tue, 26 Sep 2023 17:21:53 +0300
From 4926a18454135e97832e2d183893f01a2f42a06c Mon Sep 17 00:00:00 2001
From: "zero <at> fedora" <shinyzero0 <at> tilde.club>
Date: Mon, 25 Sep 2023 19:39:00 +0300
Subject: [PATCH] gnu: Add keyd

* gnu/packages/keyd.scm: New file.
* gnu/local.mk: Add it.
---
 gnu/local.mk          |  1 +
 gnu/packages/keyd.scm | 60 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 gnu/packages/keyd.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index bfa816d717..f0745fed65 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -690,6 +690,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/services/guix.scm			\
   %D%/services/hurd.scm				\
   %D%/services/kerberos.scm			\
+  %D%/services/keyd.scm			\
   %D%/services/ldap.scm		      		\
   %D%/services/lightdm.scm      		\
   %D%/services/linux.scm			\
diff --git a/gnu/packages/keyd.scm b/gnu/packages/keyd.scm
new file mode 100644
index 0000000000..666b931650
--- /dev/null
+++ b/gnu/packages/keyd.scm
@@ -0,0 +1,60 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Paul <shinyzero0 <at> tilde.club>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages keyd)
+  #:use-module (gnu packages linux)
+  #:use-module (guix packages)
+  #:use-module (guix gexp)
+  #:use-module (guix utils)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu))
+
+(define-public keyd
+  (package
+    (name "keyd")
+    (version "2.4.3")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/rvaiya/keyd")
+               (commit (string-append "v" version))))
+        (sha256
+          (base32
+            "1awdp863amq95y990fi4wj389ssv3ip2daqz2ph23lsahwa6f5in"))))
+    (arguments
+      (list #:tests? #f ; tests require root
+            #:make-flags
+            #~(list (string-append "CC=" #$(cc-for-target))
+                    "PREFIX="
+                    (string-append "DESTDIR=" #$output))
+            #:phases
+            '(modify-phases
+               %standard-phases
+               (delete 'configure)))) ; no autoconf
+    (build-system gnu-build-system)
+    (inputs (list linux-libre-headers))
+    (synopsis "A key remapping daemon for linux.")
+    (description
+      "Keyd is a keyboard remapping utility with intuitive ini
+      config file format. Keyd has several features, many of
+      which are traditionally only found in custom keyboard firmware
+      like QMK")
+    (home-page "https://github.com/rvaiya/keyd")
+    (license license:expat)))
-- 
2.41.0




Information forwarded to guix-patches <at> gnu.org:
bug#66193; Package guix-patches. (Tue, 26 Sep 2023 14:25:02 GMT) Full text and rfc822 format available.

Message #14 received at 66193 <at> debbugs.gnu.org (full text, mbox):

From: "ShinyZero0" <shinyzero0 <at> tilde.club>
To: "Jack Hill" <jackhill <at> jackhill.us>
Cc: 66193 <at> debbugs.gnu.org
Subject: Re: [bug#66193] [PATCH] gnu: Add keyd.
Date: Tue, 26 Sep 2023 17:24:22 +0300
Thanks for your review!
I don't know how should i handle the tests requiring user to be root.
I tried simply removing `sudo` calls but that didn't work, so tests are
still disabled for now.




Added tag(s) moreinfo. Request was from Christopher Baines <mail <at> cbaines.net> to control <at> debbugs.gnu.org. (Wed, 04 Oct 2023 11:14:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#66193; Package guix-patches. (Wed, 01 Jan 2025 10:32:01 GMT) Full text and rfc822 format available.

Message #19 received at 66193 <at> debbugs.gnu.org (full text, mbox):

From: 45mg <45mg.writes <at> gmail.com>
To: "ShinyZero0" <shinyzero0 <at> tilde.club>,
	66193 <at> debbugs.gnu.org
Subject: [PATCH v3] gnu: Add keyd
Date: Wed,  1 Jan 2025 05:24:53 -0500
From: ShinyZero0 <shinyzero0 <at> tilde.club>

From 4926a18454135e97832e2d183893f01a2f42a06c Mon Sep 17 00:00:00 2001
From: "zero <at> fedora" <shinyzero0 <at> tilde.club>
Date: Mon, 25 Sep 2023 19:39:00 +0300
Subject: [PATCH] gnu: Add keyd

* gnu/packages/keyd.scm: New file.
* gnu/local.mk: Add it.

Change-Id: I9a796d5970d910b933999a146c99060413dc13e1
---
This revision fixes a small typo in gnu/local.mk (services/keyd.scm ->
packages/keyd.scm).

Other than that, I've tested this in a VM and it works fine. While we're still
skipping the tests since they require root to run, that's a common approach that
isn't at all unique to this package [1].

So, I guess this can be merged, or at least reviewed further.

The patch I'm replying to should have been titled 'v2'; this is v3.

[1] https://lists.gnu.org/archive/html/guix-devel/2025-01/msg00001.html


 gnu/local.mk          |  1 +
 gnu/packages/keyd.scm | 60 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 gnu/packages/keyd.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 02a6fa616e..45862dfa47 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -412,6 +412,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/kde-systemtools.scm		\
   %D%/packages/kde-utils.scm			\
   %D%/packages/kerberos.scm			\
+  %D%/packages/keyd.scm			\
   %D%/packages/kodi.scm				\
   %D%/packages/language.scm			\
   %D%/packages/lean.scm				\
diff --git a/gnu/packages/keyd.scm b/gnu/packages/keyd.scm
new file mode 100644
index 0000000000..666b931650
--- /dev/null
+++ b/gnu/packages/keyd.scm
@@ -0,0 +1,60 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2023 Paul <shinyzero0 <at> tilde.club>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages keyd)
+  #:use-module (gnu packages linux)
+  #:use-module (guix packages)
+  #:use-module (guix gexp)
+  #:use-module (guix utils)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu))
+
+(define-public keyd
+  (package
+    (name "keyd")
+    (version "2.4.3")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/rvaiya/keyd")
+               (commit (string-append "v" version))))
+        (sha256
+          (base32
+            "1awdp863amq95y990fi4wj389ssv3ip2daqz2ph23lsahwa6f5in"))))
+    (arguments
+      (list #:tests? #f ; tests require root
+            #:make-flags
+            #~(list (string-append "CC=" #$(cc-for-target))
+                    "PREFIX="
+                    (string-append "DESTDIR=" #$output))
+            #:phases
+            '(modify-phases
+               %standard-phases
+               (delete 'configure)))) ; no autoconf
+    (build-system gnu-build-system)
+    (inputs (list linux-libre-headers))
+    (synopsis "A key remapping daemon for linux.")
+    (description
+      "Keyd is a keyboard remapping utility with intuitive ini
+      config file format. Keyd has several features, many of
+      which are traditionally only found in custom keyboard firmware
+      like QMK")
+    (home-page "https://github.com/rvaiya/keyd")
+    (license license:expat)))

base-commit: c943829ac7b25ac6326f78fe947a5d79c283627b
-- 
2.47.1





Information forwarded to leo <at> famulari.name, w <at> wmeyer.eu, guix-patches <at> gnu.org:
bug#66193; Package guix-patches. (Tue, 25 Feb 2025 13:07:02 GMT) Full text and rfc822 format available.

Message #22 received at 66193 <at> debbugs.gnu.org (full text, mbox):

From: 45mg <45mg.writes <at> gmail.com>
To: 45mg <45mg.writes <at> gmail.com>, ShinyZero0 <shinyzero0 <at> tilde.club>,
 66193 <at> debbugs.gnu.org
Subject: [PATCH v4] gnu: Add keyd.
Date: Tue, 25 Feb 2025 18:33:25 +0530
From: ShinyZero0 <shinyzero0 <at> tilde.club>

* gnu/packages/linux.scm (keyd): New variable.

Change-Id: Ib69e4dea661dc72c3116442779b5b496d37b37bd
---
Move from gnu/packages/keyd.scm (deleting it) to gnu/packages/linux.scm
(suggested in review, but not addressed).

Bump keyd 2.4.3->2.5.0 and rebase onto latest master.

This patch is almost 1.5 years old.

 gnu/packages/linux.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d56ca37053..4f66f21859 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -10032,6 +10032,40 @@ (define-public inputattach
 types and interfaces and translates so that the X server can use them.")
     (license license:gpl2+)))
 
+(define-public keyd
+  (package
+    (name "keyd")
+    (version "2.5.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/rvaiya/keyd")
+               (commit (string-append "v" version))))
+        (sha256
+          (base32
+            "0nkra6lwdjhjcwj6486cgy562n4bcp98fjgl52rj8pp76i15yad7"))))
+    (arguments
+      (list #:tests? #f ; tests require root
+            #:make-flags
+            #~(list (string-append "CC=" #$(cc-for-target))
+                    "PREFIX="
+                    (string-append "DESTDIR=" #$output))
+            #:phases
+            '(modify-phases
+               %standard-phases
+               (delete 'configure)))) ; no autoconf
+    (build-system gnu-build-system)
+    (inputs (list linux-libre-headers))
+    (synopsis "A key remapping daemon for linux.")
+    (description
+      "Keyd is a keyboard remapping utility with intuitive ini
+      config file format. Keyd has several features, many of
+      which are traditionally only found in custom keyboard firmware
+      like QMK")
+    (home-page "https://github.com/rvaiya/keyd")
+    (license license:expat)))
+
 (define-public pipewire
   (package
     (name "pipewire")

base-commit: 14a7cb000cb913c54af69407b879b3a27e7820a4
-- 
2.48.1





Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Tue, 25 Feb 2025 17:23:01 GMT) Full text and rfc822 format available.

Notification sent to "ShinyZero0" <shinyzero0 <at> tilde.club>:
bug acknowledged by developer. (Tue, 25 Feb 2025 17:23:02 GMT) Full text and rfc822 format available.

Message #27 received at 66193-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 66193-done <at> debbugs.gnu.org
Cc: ShinyZero0 <shinyzero0 <at> tilde.club>, Christopher Baines <mail <at> cbaines.net>,
 Jack Hill <jackhill <at> jackhill.us>, 45mg <45mg.writes <at> gmail.com>
Subject: Re: [PATCH] gnu: Add keyd.
Date: Tue, 25 Feb 2025 18:21:49 +0100
Hello,

> From: ShinyZero0 <shinyzero0 <at> tilde.club>
> 
> * gnu/packages/linux.scm (keyd): New variable.

Applied with a tweak to synopsis and decription. Thank you, and sorry
for the delay.

Regards,
-- 
Nicolas Goaziou






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Mar 2025 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.