emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67534: closed ([PATCH] gnu: qmk: Support custom keyboards.)


From: GNU bug Tracking System
Subject: bug#67534: closed ([PATCH] gnu: qmk: Support custom keyboards.)
Date: Mon, 01 Apr 2024 00:23:02 +0000

Your message dated Sun, 31 Mar 2024 20:21:57 -0400
with message-id <87v852vsnu.fsf@gmail.com>
and subject line Re: Requesting review
has caused the debbugs.gnu.org bug report #67534,
regarding [PATCH] gnu: qmk: Support custom keyboards.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
67534: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67534
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- 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




--- End Message ---
--- Begin Message --- Subject: Re: Requesting review Date: Sun, 31 Mar 2024 20:21:57 -0400 User-agent: Gnus/5.13 (Gnus v5.13)
Hi!

Sergey Trofimov <sarg@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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]