GNU bug report logs - #67534
[PATCH] gnu: qmk: Support custom keyboards.

Previous Next

Package: guix-patches;

Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>

Date: Wed, 29 Nov 2023 20:33:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

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 67534 in the body.
You can then email your comments to 67534 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 efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org:
bug#67534; Package guix-patches. (Wed, 29 Nov 2023 20:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergey Trofimov <sarg <at> sarg.org.ru>:
New bug report received and forwarded. Copy sent to efraim <at> flashner.co.il, vagrant <at> debian.org, guix-patches <at> gnu.org. (Wed, 29 Nov 2023 20:33:02 GMT) Full text and rfc822 format available.

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

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: guix-patches <at> gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] gnu: qmk: Support custom keyboards.
Date: Wed, 29 Nov 2023 21:32:12 +0100
* gnu/packages/firmware.scm (make-qmk-firmware/implementation):
Add keyboard-source-directory parameter.
---
 gnu/packages/firmware.scm | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 294bbea184..e06b321cde 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1406,14 +1406,16 @@ (define-public qmk
 (define* (make-qmk-firmware/implementation keyboard keymap
                                            #:key (description "")
                                            keymap-json
-                                           keymap-source-directory)
+                                           keymap-source-directory
+                                           keyboard-source-directory)
   "Return a package to build the QMK firmware for KEYBOARD with KEYMAP.
-Keyboard should be the name of a sub-directory under the @file{keyboards}
-directory.  For custom keymaps, KEYMAP-JSON, a file-like object of a JSON
-representation of KEYMAP as generated by the @url{https://config.qmk.fm/, QMK
-Configurator} tool or KEYMAP-SOURCE-DIRECTORY, a file-like object directory
-containing the keymap source files files such as @file{keymap.c}, can be
-provided."
+Keyboard should be the name of a sub-directory under the @file{keyboards} directory.
+For custom keymaps, KEYMAP-JSON, a file-like object of a JSON representation of
+KEYMAP as generated by the @url{https://config.qmk.fm/, QMK Configurator} tool or
+KEYMAP-SOURCE-DIRECTORY, a file-like object directory containing the keymap source
+files files such as @file{keymap.c}, can be provided.  For keyboards not available in
+upstream repository, provide a file-like object directory containing the whole
+keyboard definition in KEYBOARD-SOURCE-DIRECTORY."
   (package
     (name (string-append "qmk-firmware-"
                          (string-replace-substring keyboard "_" "-") "-"
@@ -1472,6 +1474,15 @@ (define* (make-qmk-firmware/implementation keyboard keymap
                       (base32
                        "1rmhm4rxvq8skxqn6vc4n4ly1ak6whj7c386zbsci4pxx548n9h4"))))
                "lib/lufa")))
+          #$@(if keyboard-source-directory
+                 #~((add-after 'unpack 'copy-keyboard-source-directory
+                      (lambda _
+                        (let ((keyboard-dir #$(string-append "keyboards/" keyboard)))
+                          (false-if-exception (delete-file-recursively
+                                               keyboard-dir))
+                          (copy-recursively #$keyboard-source-directory
+                                            keyboard-dir)))))
+                 #~())
           #$@(if keymap-source-directory
                  #~((add-after 'unpack 'copy-keymap-source-directory
                       (lambda _

base-commit: cd46757c1a0f886848fbb6828c028dd2a2532767
--
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#67534; Package guix-patches. (Thu, 21 Mar 2024 21:41:02 GMT) Full text and rfc822 format available.

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

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 67534 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com
Subject: Requesting review
Date: Thu, 21 Mar 2024 22:16:14 +0100
Hi Maxim,

may I ask your review here, as you've authored qmk firmware 
package. I'm adding `keyboard-source-directory` to the 
`make-qmk-firmware` procedure, so that a custom firmware could be 
built without upstreaming a keyboard definition to the main QMK 
repo. Here is how I use it: 
https://github.com/sarg/keyboard/blob/91b87a830ef6029c1023c0d8fc877c067b12ab1e/guix.scm

Best regards,
Sergey




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Mon, 01 Apr 2024 00:23:02 GMT) Full text and rfc822 format available.

Notification sent to Sergey Trofimov <sarg <at> sarg.org.ru>:
bug acknowledged by developer. (Mon, 01 Apr 2024 00:23:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Cc: 67534-done <at> debbugs.gnu.org
Subject: Re: Requesting review
Date: Sun, 31 Mar 2024 20:21:57 -0400
Hi!

Sergey Trofimov <sarg <at> sarg.org.ru> writes:

> Hi Maxim,
>
> may I ask your review here, as you've authored qmk firmware
> package. I'm adding `keyboard-source-directory` to the
> `make-qmk-firmware` procedure, so that a custom firmware could be
> built without upstreaming a keyboard definition to the main QMK
> repo. Here is how I use it:
> https://github.com/sarg/keyboard/blob/91b87a830ef6029c1023c0d8fc877c067b12ab1e/guix.scm

Makes sense.  I'll push shortly.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 29 Apr 2024 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 days ago.

Previous Next


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