gnu: qmk: Support custom keyboards.
* gnu/packages/firmware.scm (make-qmk-firmware/implementation): Add keyboard-source-directory parameter. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I68ae5df0b0aae088ca8002dca7e30de2b23e9aa0master
parent
6906657e76
commit
2e503a5a94
gnu/packages
|
@ -1503,14 +1503,16 @@ having to run @command{qmk} as root when flashing the firmware.")
|
||||||
(define* (make-qmk-firmware/implementation keyboard keymap
|
(define* (make-qmk-firmware/implementation keyboard keymap
|
||||||
#:key (description "")
|
#:key (description "")
|
||||||
keymap-json
|
keymap-json
|
||||||
keymap-source-directory)
|
keymap-source-directory
|
||||||
|
keyboard-source-directory)
|
||||||
"Return a package to build the QMK firmware for KEYBOARD with KEYMAP.
|
"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}
|
Keyboard should be the name of a sub-directory under the @file{keyboards} directory.
|
||||||
directory. For custom keymaps, KEYMAP-JSON, a file-like object of a JSON
|
For custom keymaps, KEYMAP-JSON, a file-like object of a JSON representation of
|
||||||
representation of KEYMAP as generated by the @url{https://config.qmk.fm/, QMK
|
KEYMAP as generated by the @url{https://config.qmk.fm/, QMK Configurator} tool or
|
||||||
Configurator} tool or KEYMAP-SOURCE-DIRECTORY, a file-like object directory
|
KEYMAP-SOURCE-DIRECTORY, a file-like object directory containing the keymap source
|
||||||
containing the keymap source files files such as @file{keymap.c}, can be
|
files files such as @file{keymap.c}, can be provided. For keyboards not available in
|
||||||
provided."
|
upstream repository, provide a file-like object directory containing the whole
|
||||||
|
keyboard definition in KEYBOARD-SOURCE-DIRECTORY."
|
||||||
(package
|
(package
|
||||||
(name (string-append "qmk-firmware-"
|
(name (string-append "qmk-firmware-"
|
||||||
(string-replace-substring keyboard "_" "-") "-"
|
(string-replace-substring keyboard "_" "-") "-"
|
||||||
|
@ -1570,6 +1572,15 @@ provided."
|
||||||
(base32
|
(base32
|
||||||
"1rmhm4rxvq8skxqn6vc4n4ly1ak6whj7c386zbsci4pxx548n9h4"))))
|
"1rmhm4rxvq8skxqn6vc4n4ly1ak6whj7c386zbsci4pxx548n9h4"))))
|
||||||
"lib/lufa")))
|
"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
|
#$@(if keymap-source-directory
|
||||||
#~((add-after 'unpack 'copy-keymap-source-directory
|
#~((add-after 'unpack 'copy-keymap-source-directory
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
Reference in New Issue